baseframe-spring-boot-starter

Demo project for Spring Boot

License

License

Categories

Categories

Spring Boot Container Microservices
GroupId

GroupId

com.github.houbbbbb
ArtifactId

ArtifactId

baseframe-spring-boot-starter
Last Version

Last Version

0.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

baseframe-spring-boot-starter
Demo project for Spring Boot
Project URL

Project URL

https://github.com/houbbbbb/baseframe-spring-boot-starter
Source Code Management

Source Code Management

https://github.com/houbbbbb/baseframe-spring-boot-starter

Download baseframe-spring-boot-starter

How to add to project

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

Dependencies

compile (6)

Group / Artifact Type Version
org.springframework.boot : spring-boot-configuration-processor jar 2.2.0.RELEASE
org.springframework.boot : spring-boot-autoconfigure jar 2.2.0.RELEASE
org.apache.maven.plugins : maven-gpg-plugin jar 1.5
org.apache.maven.plugins : maven-javadoc-plugin jar 3.1.0
org.apache.maven.plugins : maven-source-plugin jar 3.1.0
org.apache.maven.plugins : maven-release-plugin jar 2.5.1

Project Modules

There are no modules declared in this project.

baseframe-spring-boot-starter

一个自动生成代码的支持mybatis的框架

maven中央仓库依赖

<dependency>
    <groupId>com.github.houbbbbb</groupId>
    <artifactId>baseframe-spring-boot-starter</artifactId>
    <version>0.0.1</version>
</dependency>

配置 application.yml

# 配置生成代码的数据库来源
spring:
  datasource:
    url: jdbc:mysql://127.0.0.1:3306/test
    userName: root
    password: root
# 配置生成路径
generate:
  enPath: G:/project/src/main/java/com/myproject/dto # 生成代码的包的绝对路径
  enPack: com.myproject.dto # 生成代码的包名
  enMPath: G:/project/src/main/resources/mapper # 生成mapper.xml的路径

生成代码

@Autowired
GenerateOpt generateOpt;

@Test
public void test2() {
    generateOpt.create("user"); // 这里可以同时生成多个表的实例代码
}

然后导一下包就可以直接使用了

注意:由于update方法的条件不确定,所以如果要是用update,需要在mapper.xml中将中不需要的条件参数删去

使用

@Autowired
UserService UserService;
    
@Test
public void test2() {
    userService.queryAll(new User());
    userService.queryOne(new User());
    userService.queryCount(new User());
    userService.saveAll(new ArrayList<>());
    userService.saveOne(new User());
    userService.modify(new User());
    userService.remove(new User());
}
    

Versions

Version
0.0.3
0.0.2
0.0.1