Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
data-acquisition
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
竹天卫
data-acquisition
Commits
c4bd4a51
Commit
c4bd4a51
authored
4 years ago
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GenneratorApplication 代码生成器生成sqlserver
strategy.setEnableSqlFilter(false) 关闭sql过滤
parent
01586878
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
application-dev.yml
acquisition-business/src/main/resources/application-dev.yml
+1
-1
pom.xml
mybatis-generator/pom.xml
+13
-0
GeneratorApplication.java
.../java/cn/wise/sc/acquisition/mg/GeneratorApplication.java
+6
-2
No files found.
acquisition-business/src/main/resources/application-dev.yml
View file @
c4bd4a51
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
mybatis-generator/pom.xml
View file @
c4bd4a51
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
mybatis-generator/src/main/java/cn/wise/sc/acquisition/mg/GeneratorApplication.java
View file @
c4bd4a51
...
@@ -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("你自己的父类控制器,没有就不用设置!");
// 写于父类中的公共字段
// 写于父类中的公共字段
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment