初始化
This commit is contained in:
@@ -17,11 +17,11 @@ import java.util.Collections;
|
|||||||
public class CodeGenerator {
|
public class CodeGenerator {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
FastAutoGenerator.create("url", "username", "password")
|
FastAutoGenerator.create("124.220.110.250:3306", "root", "a695752274A")
|
||||||
.globalConfig(builder -> {
|
.globalConfig(builder -> {
|
||||||
builder.author("baomidou") // 设置作者
|
builder.author("baomidou") // 设置作者
|
||||||
.enableSwagger() // 开启 swagger 模式
|
.enableSwagger() // 开启 swagger 模式
|
||||||
.outputDir("D://"); // 指定输出目录
|
.outputDir(System.getProperty("user.dir")); // 指定输出目录
|
||||||
})
|
})
|
||||||
.dataSourceConfig(builder ->
|
.dataSourceConfig(builder ->
|
||||||
builder.typeConvertHandler((globalConfig, typeRegistry, metaInfo) -> {
|
builder.typeConvertHandler((globalConfig, typeRegistry, metaInfo) -> {
|
||||||
@@ -34,7 +34,7 @@ public class CodeGenerator {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
.packageConfig(builder ->
|
.packageConfig(builder ->
|
||||||
builder.parent("com.baomidou.mybatisplus.samples.generator") // 设置父包名
|
builder.parent("com.kkz.kpersonalre.entity.BaseEntity") // 设置父包名
|
||||||
.moduleName("system") // 设置父包模块名
|
.moduleName("system") // 设置父包模块名
|
||||||
.pathInfo(Collections.singletonMap(OutputFile.xml, "D://")) // 设置mapperXml生成路径
|
.pathInfo(Collections.singletonMap(OutputFile.xml, "D://")) // 设置mapperXml生成路径
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user