master
rong.liu 6 months ago
parent e643ea1514
commit 9dcf313952
  1. 6
      src/main/java/com/huoran/iasf/common/config/SwaggerConfiguration.java
  2. 6
      src/main/resources/application-dev.yml
  3. 6
      src/test/java/com/company/project/CodeGenerator.java

@ -26,7 +26,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableKnife4j @EnableKnife4j
@Import(BeanValidatorPluginsConfiguration.class) @Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfiguration { public class SwaggerConfiguration {
@Bean @Bean
public Docket createRestApi() { public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2) return new Docket(DocumentationType.SWAGGER_2)
@ -37,10 +36,11 @@ public class SwaggerConfiguration {
.build(); .build();
} }
private ApiInfo apiInfo() { private ApiInfo apiInfo() {
return new ApiInfoBuilder() return new ApiInfoBuilder()
.title("IASF APIs") .title("OCCUPATIONLAB APIS")
.description("粒子研究院 APIs") .description("职站商场 APIs")
.termsOfServiceUrl("http://localhost:10000/") .termsOfServiceUrl("http://localhost:10000/")
.version("V1.0") .version("V1.0")
.build(); .build();

@ -6,9 +6,9 @@ spring:
datasource: datasource:
master: master:
username: root username: root
password: 123456 # password: 123456
# password: iasf#2022 # password: iasf#2022
# password: HuoRan@2021 password: HuoRan@2021
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://127.0.0.1:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8 # url: jdbc:mysql://127.0.0.1:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8
url: jdbc:mysql://192.168.31.136:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8 url: jdbc:mysql://192.168.31.136:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8
@ -41,7 +41,7 @@ file:
#本地开启 #本地开启
url: :10000/iasf/sysFiles/preview/ url: :10000/iasf/sysFiles/preview/
ip: http://192.168.31.136 # ip: http://192.168.31.136
#本次需更新 #本次需更新
#模板数据 #模板数据

@ -41,10 +41,10 @@ public class CodeGenerator {
// 3、数据源配置 // 3、数据源配置
DataSourceConfig dsc = new DataSourceConfig(); DataSourceConfig dsc = new DataSourceConfig();
dsc.setUrl("jdbc:mysql://192.168.31.136:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8"); dsc.setUrl("jdbc:mysql://139.9.47.170:3306/iasf?serverTimezone=GMT%2B8");
dsc.setDriverName("com.mysql.cj.jdbc.Driver"); dsc.setDriverName("com.mysql.cj.jdbc.Driver");
dsc.setUsername("root"); dsc.setUsername("root");
dsc.setPassword("123456"); dsc.setPassword("HuoRan@2021");
dsc.setDbType(DbType.MYSQL); dsc.setDbType(DbType.MYSQL);
mpg.setDataSource(dsc); mpg.setDataSource(dsc);
@ -61,7 +61,7 @@ public class CodeGenerator {
// 5、策略配置 // 5、策略配置
StrategyConfig strategy = new StrategyConfig(); StrategyConfig strategy = new StrategyConfig();
strategy.setInclude("sys_template_style_configuration"); strategy.setInclude("sys_floating_column_scheme_scope_of_application");
strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略 strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略
// strategy.setTablePrefix("sys_"); //生成实体时去掉表前缀 // strategy.setTablePrefix("sys_"); //生成实体时去掉表前缀

Loading…
Cancel
Save