Commit c4bd4a51 authored by 竹天卫's avatar 竹天卫

GenneratorApplication 代码生成器生成sqlserver

strategy.setEnableSqlFilter(false)   关闭sql过滤
parent 01586878
...@@ -9,7 +9,7 @@ spring: ...@@ -9,7 +9,7 @@ spring:
datasource: datasource:
# 192.168.110.85 fpsn # 192.168.110.85 fpsn
url: jdbc:sqlserver://192.168.110.85:1433;DatabaseName=fpsn url: jdbc:sqlserver://192.168.110.85:1433;DatabaseName=fpsn
username: root username: sa
password: admin!@#123 password: admin!@#123
driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
hikari: hikari:
......
...@@ -19,6 +19,19 @@ ...@@ -19,6 +19,19 @@
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>8.2.2.jre8</version>
</dependency>
<dependency>
<groupId>com.hynnet</groupId>
<artifactId>sqljdbc4-chs</artifactId>
<version>4.0.2206.100</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId> <artifactId>spring-boot-starter-jdbc</artifactId>
......
...@@ -47,9 +47,9 @@ public class GeneratorApplication { ...@@ -47,9 +47,9 @@ public class GeneratorApplication {
AutoGenerator mpg = new AutoGenerator(); AutoGenerator mpg = new AutoGenerator();
// 数据源配置 // 数据源配置
DataSourceConfig dsc = new DataSourceConfig(); DataSourceConfig dsc = new DataSourceConfig();
dsc.setUrl("jdbc:sqlserver://192.168.110.85:1433"); dsc.setUrl("jdbc:sqlserver://192.168.110.85:1433;DatabaseName=fpsn");
dsc.setDriverName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); dsc.setDriverName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
dsc.setUsername("root"); dsc.setUsername("sa");
dsc.setPassword("admin!@#123"); dsc.setPassword("admin!@#123");
mpg.setDataSource(dsc); mpg.setDataSource(dsc);
...@@ -124,6 +124,10 @@ public class GeneratorApplication { ...@@ -124,6 +124,10 @@ public class GeneratorApplication {
//strategy.setSuperEntityClass("你自己的父类实体,没有就不用设置!"); //strategy.setSuperEntityClass("你自己的父类实体,没有就不用设置!");
strategy.setEntityLombokModel(true); strategy.setEntityLombokModel(true);
strategy.setRestControllerStyle(true); strategy.setRestControllerStyle(true);
//关闭sql过滤
strategy.setEnableSqlFilter(false);
// 公共父类 // 公共父类
//strategy.setSuperControllerClass("你自己的父类控制器,没有就不用设置!"); //strategy.setSuperControllerClass("你自己的父类控制器,没有就不用设置!");
// 写于父类中的公共字段 // 写于父类中的公共字段
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment