spring-boot-starter-jdbc-helper

SpringJDBC Helper

License

License

Categories

Categories

Spring Boot Container Microservices
GroupId

GroupId

com.github.nyvi
ArtifactId

ArtifactId

spring-boot-starter-jdbc-helper
Last Version

Last Version

1.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

spring-boot-starter-jdbc-helper
SpringJDBC Helper
Project URL

Project URL

https://github.com/nyvi/spring-boot-starter-jdbc-helper
Source Code Management

Source Code Management

https://github.com/nyvi/spring-boot-starter-jdbc-helper.git

Download spring-boot-starter-jdbc-helper

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.nyvi/spring-boot-starter-jdbc-helper/ -->
<dependency>
    <groupId>com.github.nyvi</groupId>
    <artifactId>spring-boot-starter-jdbc-helper</artifactId>
    <version>1.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.nyvi/spring-boot-starter-jdbc-helper/
implementation 'com.github.nyvi:spring-boot-starter-jdbc-helper:1.1.2'
// https://jarcasting.com/artifacts/com.github.nyvi/spring-boot-starter-jdbc-helper/
implementation ("com.github.nyvi:spring-boot-starter-jdbc-helper:1.1.2")
'com.github.nyvi:spring-boot-starter-jdbc-helper:jar:1.1.2'
<dependency org="com.github.nyvi" name="spring-boot-starter-jdbc-helper" rev="1.1.2">
  <artifact name="spring-boot-starter-jdbc-helper" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.nyvi', module='spring-boot-starter-jdbc-helper', version='1.1.2')
)
libraryDependencies += "com.github.nyvi" % "spring-boot-starter-jdbc-helper" % "1.1.2"
[com.github.nyvi/spring-boot-starter-jdbc-helper "1.1.2"]

Dependencies

compile (1)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-jdbc jar

Project Modules

There are no modules declared in this project.

spring-boot-starter-jdbc-helper

支持jdk版本为1.8或者1.8+
spring-boot-starter-jdbc-helper 是在springboot && springJDBC 基础上只做增强不做改变,为简化开发、提高效率而生。

如何使用

  • 添加依赖:
<dependency>
    <groupId>com.github.nyvi</groupId>
    <artifactId>spring-boot-starter-jdbc-helper</artifactId>
    <version>1.1.1</version>
</dependency>
  • 创建DO
@Table("sys_user")
@SuppressWarnings("serial")
public class SysUserDO implements Serializable {

	/**
	 * id
	 */
	@Id
	private Long id;

	/**
	 * 用户名
	 */
	@Column
	private String username;

	/**
	 * 创建时间
	 */
	@Column(update = false)
	private Date gmtCreate;

	/**
	 * 修改时间
	 */
	@Column
	private Date gmtModified;
  
	//...
}
  • 创建DAO
@Repository
public class SysUserDAO extends BaseDAO<SysUserDO> {

}
  • 创建Service
public interface SysUserService extends BaseService<SysUserDO> {

}
  • 创建ServiceImpl
@Service
public class SysUserServiceImpl extends BaseServiceImpl<SysUserDO> implements SysUserService {

}
  • 创建Query
@SuppressWarnings("serial")
public class SysUserQuery extends SysUserDO {

	@Query(operate = Operate.LIKE, suffix = "%")
	public String username;
  	
	//...
}

Versions

Version
1.1.2
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0