Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
polysoft-nafmii
/
polysoft-parent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9292bc5f
authored
Apr 26, 2021
by
ypenglv
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
组件问题解决
1 parent
9cec0563
Show whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
738 additions
and
756 deletions
nafmii-admin/pom.xml
nafmii-admin/src/main/java/org/nafmii/nafmiiadmin/controller/TestController.java
nafmii-app/pom.xml
nafmii-app/src/main/java/org/nafmii/NafmiiAppApplication.java
nafmii-app/src/main/java/org/nafmii/controller/UserController.java
nafmii-app/src/main/java/org/nafmii/service/UserService.java
nafmii-app/src/main/java/org/nafmii/service/impl/UserServiceImpl.java
nafmii-app/src/main/resources/application.properties
nafmii-app/src/main/resources/application.yml
nafmii-common/pom.xml
nafmii-common/src/main/java/org/nafmii/exception/BusinessExceptionHandler.java
nafmii-common/src/main/java/org/nafmii/param/BeanTransferUtils.java
nafmii-common/src/main/java/org/nafmii/param/OrderBy.java
nafmii-common/src/main/java/org/nafmii/param/PageQuery.java
nafmii-common/src/main/java/org/nafmii/param/PageResult.java
nafmii-common/src/main/java/org/nafmii/response/ApiResponse.java
nafmii-common/src/main/java/org/nafmii/response/Result.java
nafmii-common/src/main/java/org/nafmii/response/Springs.java
nafmii-common/src/main/java/org/nafmii/utils/BeanTransferUtils.java
nafmii-common/src/main/java/org/nafmii/utils/PageResult.java
nafmii-common/src/main/java/org/nafmii/utils/PagedResult.java
nafmii-common/src/main/java/org/nafmii/utils/RequestUtils.java
nafmii-eureka/pom.xml
nafmii-eureka/src/main/resources/application.properties
nafmii-eureka/src/main/resources/application.yml
nafmii-gateway/pom.xml
nafmii-gateway/src/main/java/org/nafmii/NafmiiGatewayApplication.java
nafmii-gateway/src/main/java/org/nafmii/config/AccessFilter.java
nafmii-gateway/src/main/resources/application.yml
nafmii-gateway/src/test/java/org/nafmii/NafmiiGatewayApplicationTests.java
nafmii-mbg/pom.xml
nafmii-mbg/src/main/java/org/nafmii/nafmiimbg/NafmiiMbgApplication.java
nafmii-mbg/src/main/java/org/nafmii/nafmiimbg/model/CenterRole.java
nafmii-mbg/src/main/java/org/nafmii/nafmiimbg/model/CenterRoleExample.java
nafmii-mbg/src/main/resources/org/nafmii/nafmiimbg/mapper/CenterRoleMapper.xml
nafmii-quartz/pom.xml
nafmii-quartz/src/main/java/org/nafmii/nafmiiquartz/NafmiiQuartzApplication.java
nafmii-quartz/src/main/resources/application.yml
pom.xml
nafmii-admin/pom.xml
View file @
9292bc5
...
@@ -17,111 +17,48 @@
...
@@ -17,111 +17,48 @@
<properties>
<properties>
<java.version>
1.8
</java.version>
<java.version>
1.8
</java.version>
<spring-cloud.version>
2020.0.2
</spring-cloud.version>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<!--<exclusions><!– 去掉springboot默认配置 –>-->
<!--<exclusion>-->
<!--<groupId>org.springframework.boot</groupId>-->
<!--<artifactId>spring-boot-starter-logging</artifactId>-->
<!--</exclusion>-->
<!--</exclusions>-->
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>org.springframework.boot</groupId>-->
<!--<artifactId>spring-boot-starter-data-redis</artifactId>-->
<!--</dependency>-->
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
</dependency>
<!--Mysql数据库驱动-->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<!--<!–MyBatis分页插件–>-->
<!--<dependency>-->
<!--<groupId>com.github.pagehelper</groupId>-->
<!--<artifactId>pagehelper</artifactId>-->
<!--</dependency>-->
<!--feign -->
<!--<dependency>-->
<!--<groupId>org.projectlombok</groupId>-->
<!--<artifactId>lombok</artifactId>-->
<!--</dependency>-->
<dependency>
<groupId>
org.mybatis.generator
</groupId>
<artifactId>
mybatis-generator-core
</artifactId>
</dependency>
<!-- MyBatis-->
<!--<dependency>-->
<!--<groupId>org.mybatis</groupId>-->
<!--<artifactId>mybatis</artifactId>-->
<!--</dependency>-->
<!--SpringData工具包-->
<!--<dependency>-->
<!--<groupId>org.springframework.data</groupId>-->
<!--<artifactId>spring-data-commons</artifactId>-->
<!--</dependency>-->
<!-- https://mvnrepository.com/artifact/com.oracle/ojdbc14 -->
<!--<dependency>-->
<!--<groupId>com.oracle</groupId>-->
<!--<artifactId>ojdbc14</artifactId>-->
<!--</dependency>-->
<!--JWT(Json Web Token)登录支持-->
<!--集成logstash-->
<dependency>
<groupId>
net.logstash.logback
</groupId>
<artifactId>
logstash-logback-encoder
</artifactId>
</dependency>
<!--集成SpringBoot Admin监控-->
<!--集成SpringBoot Admin监控-->
<!-- https://mvnrepository.com/artifact/de.codecentric/spring-boot-admin-starter-server -->
<dependency>
<dependency>
<groupId>
de.codecentric
</groupId>
<groupId>
de.codecentric
</groupId>
<artifactId>
spring-boot-admin-starter-server
</artifactId>
<artifactId>
spring-boot-admin-starter-server
</artifactId>
<version>
2.4.1
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.nafmii
</groupId>
<groupId>
org.nafmii
</groupId>
<artifactId>
nafmii-common
</artifactId>
<artifactId>
nafmii-common
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
</dependency>
<!--接口文档-->
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
mysql
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
8.0.20
</version>
</dependency>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
${spring-cloud.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
...
...
nafmii-admin/src/main/java/org/nafmii/nafmiiadmin/controller/TestController.java
View file @
9292bc5
...
@@ -4,7 +4,6 @@ import io.swagger.annotations.Api;
...
@@ -4,7 +4,6 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.nafmii.nafmiiadmin.service.TestService
;
import
org.nafmii.nafmiiadmin.service.TestService
;
import
org.nafmii.result.Result
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
nafmii-app/pom.xml
View file @
9292bc5
...
@@ -17,119 +17,37 @@
...
@@ -17,119 +17,37 @@
<properties>
<properties>
<java.version>
1.8
</java.version>
<java.version>
1.8
</java.version>
<spring-cloud.version>
2020.0.2
</spring-cloud.version>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<!--<exclusions><!– 去掉springboot默认配置 –>-->
<!--<exclusion>-->
<!--<groupId>org.springframework.boot</groupId>-->
<!--<artifactId>spring-boot-starter-logging</artifactId>-->
<!--</exclusion>-->
<!--</exclusions>-->
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<!--<dependency>-->
<!--<groupId>org.springframework.boot</groupId>-->
<!--<artifactId>spring-boot-starter-data-redis</artifactId>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>com.github.pagehelper</groupId>-->
<!--<artifactId>pagehelper-spring-boot-starter</artifactId>-->
<!--</dependency>-->
<!--feign -->
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
</dependency>
<dependency>
<groupId>
org.mybatis.generator
</groupId>
<artifactId>
mybatis-generator-core
</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>org.projectlombok</groupId>-->
<!--<artifactId>lombok</artifactId>-->
<!--</dependency>-->
<!-- MyBatis-->
<!--<dependency>-->
<!--<groupId>org.mybatis</groupId>-->
<!--<artifactId>mybatis</artifactId>-->
<!--</dependency>-->
<!--SpringData工具包-->
<!--<dependency>-->
<!--<groupId>org.springframework.data</groupId>-->
<!--<artifactId>spring-data-commons</artifactId>-->
<!--</dependency>-->
<!-- https://mvnrepository.com/artifact/com.oracle/ojdbc14 -->
<!--<dependency>-->
<!--<groupId>com.oracle</groupId>-->
<!--<artifactId>ojdbc14</artifactId>-->
<!--</dependency>-->
<!--JWT(Json Web Token)登录支持-->
<!--<dependency>-->
<!--<groupId>org.springframework.security.oauth.boot</groupId>-->
<!--<artifactId>spring-security-oauth2-autoconfigure</artifactId>-->
<!--<version>2.1.4.RELEASE</version>-->
<!--</dependency>-->
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.47
</version>
</dependency>
<!--<!– spring-security 5.2.0–>-->
<!--<dependency>-->
<!--<groupId>org.springframework.boot</groupId>-->
<!--<artifactId>spring-boot-starter-security</artifactId>-->
<!--</dependency>-->
<!--集成logstash-->
<dependency>
<groupId>
net.logstash.logback
</groupId>
<artifactId>
logstash-logback-encoder
</artifactId>
</dependency>
<!--集成SpringBoot Admin监控-->
<dependency>
<groupId>
de.codecentric
</groupId>
<artifactId>
spring-boot-admin-starter-server
</artifactId>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
org.nafmii
</groupId>
<groupId>
org.nafmii
</groupId>
<artifactId>
nafmii-common
</artifactId>
<artifactId>
nafmii-common
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
</dependency>
<!--接口文档-->
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
mysql
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
8.0.20
</version>
</dependency>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
${spring-cloud.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
...
...
nafmii-app/src/main/java/org/nafmii/NafmiiAppApplication.java
View file @
9292bc5
...
@@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
...
@@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
@SpringBootApplication
@SpringBootApplication
(
scanBasePackages
={
"org.nafmii"
,
"org.nafmii.exception"
})
@EnableEurekaClient
@EnableEurekaClient
@EnableFeignClients
@EnableFeignClients
public
class
NafmiiAppApplication
{
public
class
NafmiiAppApplication
{
...
...
nafmii-app/src/main/java/org/nafmii/controller/UserController.java
View file @
9292bc5
...
@@ -2,11 +2,11 @@ package org.nafmii.controller;
...
@@ -2,11 +2,11 @@ package org.nafmii.controller;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.nafmii.response.
Result
;
import
org.nafmii.response.
ApiResponse
;
import
org.nafmii.service.UserService
;
import
org.nafmii.service.UserService
;
import
org.nafmii.vo.UserVO
;
import
org.nafmii.vo.UserVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.
security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.
web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
@@ -27,10 +27,10 @@ public class UserController {
...
@@ -27,10 +27,10 @@ public class UserController {
@Autowired
@Autowired
private
UserService
userService
;
private
UserService
userService
;
@ApiOperation
(
value
=
"登陆"
,
notes
=
"登陆"
)
@ApiOperation
(
value
=
"登陆"
,
notes
=
"登陆"
)
@
Pos
tMapping
(
"/login"
)
@
Ge
tMapping
(
"/login"
)
@ResponseBody
@ResponseBody
public
Result
<
UserVO
>
login
(
){
public
ApiResponse
<
UserVO
>
login
(
String
ss
){
Result
<
UserVO
>
login
=
userService
.
login
(
);
ApiResponse
<
UserVO
>
login
=
userService
.
login
(
ss
);
return
login
;
return
login
;
}
}
...
...
nafmii-app/src/main/java/org/nafmii/service/UserService.java
View file @
9292bc5
package
org
.
nafmii
.
service
;
package
org
.
nafmii
.
service
;
import
org.nafmii.response.
Result
;
import
org.nafmii.response.
ApiResponse
;
import
org.nafmii.vo.UserVO
;
import
org.nafmii.vo.UserVO
;
/**
/**
...
@@ -12,5 +12,5 @@ import org.nafmii.vo.UserVO;
...
@@ -12,5 +12,5 @@ import org.nafmii.vo.UserVO;
* @remark:
* @remark:
*/
*/
public
interface
UserService
{
public
interface
UserService
{
Result
<
UserVO
>
login
(
);
ApiResponse
<
UserVO
>
login
(
String
ss
);
}
}
nafmii-app/src/main/java/org/nafmii/service/impl/UserServiceImpl.java
View file @
9292bc5
...
@@ -2,7 +2,7 @@ package org.nafmii.service.impl;
...
@@ -2,7 +2,7 @@ package org.nafmii.service.impl;
import
org.nafmii.response.
Result
;
import
org.nafmii.response.
ApiResponse
;
import
org.nafmii.service.UserService
;
import
org.nafmii.service.UserService
;
import
org.nafmii.utils.JwtUtils
;
import
org.nafmii.utils.JwtUtils
;
import
org.nafmii.vo.UserAndRoleVo
;
import
org.nafmii.vo.UserAndRoleVo
;
...
@@ -23,31 +23,9 @@ import java.util.List;
...
@@ -23,31 +23,9 @@ import java.util.List;
@Service
@Service
public
class
UserServiceImpl
implements
UserService
{
public
class
UserServiceImpl
implements
UserService
{
@Override
@Override
public
Result
<
UserVO
>
login
()
{
public
ApiResponse
<
UserVO
>
login
(
String
ss
)
{
Result
result
=
new
Result
();
UserVO
vo
=
new
UserVO
();
//假设验证数据通过
vo
.
setPassword
(
ss
);
UserVO
userVO
=
new
UserVO
();
return
new
ApiResponse
<>(
vo
);
userVO
.
setPassword
(
"zzz"
);
userVO
.
setUserName
(
"zzz"
);
List
<
UserAndRoleVo
>
roleList
=
new
ArrayList
<>();
UserAndRoleVo
roleVo
=
new
UserAndRoleVo
();
UserAndRoleVo
roleTwoVo
=
new
UserAndRoleVo
();
roleVo
.
setRole
(
"a"
);
roleList
.
add
(
roleVo
);
roleTwoVo
.
setRole
(
"b"
);
roleList
.
add
(
roleTwoVo
);
userVO
.
setAuthorities
(
roleList
);
StringBuilder
sbf
=
new
StringBuilder
();
for
(
UserAndRoleVo
role:
roleList
)
{
sbf
=
sbf
.
append
(
role
.
getRole
()+
","
);
}
//处理字符串
String
sRole
=
sbf
.
toString
();
String
substring
=
sRole
.
substring
(
0
,
sRole
.
lastIndexOf
(
","
));
String
token
=
JwtUtils
.
createToken
(
userVO
.
getUserName
(),
substring
);
userVO
.
setToken
(
token
);
result
.
setData
(
userVO
);
return
result
;
}
}
}
}
nafmii-app/src/main/resources/application.properties
deleted
100644 → 0
View file @
9cec056
server.port
=
8002
spring.application.name
=
nafmii-app
logging.level.root
=
info
logging.file.path
=
d:/data/logs/nafmii-app/
logging.file.max-
history
=
15
logging.file.max-
size
=
300MB
logging.pattern.dateformat
=
yyyy-MM-dd hh:MM:ss
eureka.client.serviceUrl.defaultZone
=
http://127.0.0.1:8761/eureka
eureka.instance.statusPageUrl
=
http://127.0.0.1:8002/swagger-ui.html
eureka.instance.prefer-ip-
address
=
true
eureka.instance.instance-
id
=
${spring.cloud.client.ip-address}:${server.port}
spring.datasource.url
=
jdbc:mysql://114.112.96.30:30029/NAFMII_2.1?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
spring.datasource.password
=
Moxi123#
spring.datasource.username
=
root
spring.datasource.driver-class-
name
=
com.mysql.cj.jdbc.Driver
mybatis.mapper-
locations
=
classpath:mapper/*.xml
\ No newline at end of file
\ No newline at end of file
nafmii-app/src/main/resources/application.yml
0 → 100644
View file @
9292bc5
eureka
:
client
:
serviceUrl
:
defaultZone
:
http://127.0.0.1:8761/eureka
instance
:
instance-id
:
${spring.cloud.client.ip-address}:${server.port}
prefer-ip-address
:
true
statusPageUrl
:
http://127.0.0.1:8002/swagger-ui.html
logging
:
file
:
max-history
:
15
max-size
:
300MB
path
:
d:/data/logs/nafmii-app/
level
:
root
:
info
pattern
:
dateformat
:
yyyy-MM-dd hh:MM:ss
mybatis
:
mapper-locations
:
classpath:mapper/*.xml
server
:
port
:
8002
spring
:
application
:
name
:
nafmii-app
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
password
:
Moxi123#
url
:
jdbc:mysql://114.112.96.30:30029/NAFMII_2.1?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
username
:
root
\ No newline at end of file
\ No newline at end of file
nafmii-common/pom.xml
View file @
9292bc5
...
@@ -19,8 +19,13 @@
...
@@ -19,8 +19,13 @@
<ojdbc.version>
10.2.0.4
</ojdbc.version>
<ojdbc.version>
10.2.0.4
</ojdbc.version>
</properties>
</properties>
<dependencies>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-openfeign -->
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
<version>
3.0.2
</version>
</dependency>
<!--swagger 相关依赖-->
<!--swagger 相关依赖-->
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<artifactId>
springfox-swagger2
</artifactId>
...
@@ -32,22 +37,22 @@
...
@@ -32,22 +37,22 @@
<artifactId>
springfox-swagger-ui
</artifactId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
2.8.0
</version>
<version>
2.8.0
</version>
</dependency>
</dependency>
<!-- https://mvnrepository.com/artifact/net.logstash.logback/logstash-logback-encoder -->
<dependency>
<dependency>
<groupId>
net.logstash.logback
</groupId>
<groupId>
net.logstash.logback
</groupId>
<artifactId>
logstash-logback-encoder
</artifactId>
<artifactId>
logstash-logback-encoder
</artifactId>
<version>
6.3
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.data
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-data-commons
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
</dependency>
<scope>
test
</scope>
<dependency>
<groupId>
org.mybatis
</groupId>
<artifactId>
mybatis
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.oracle
</groupId>
<groupId>
org.springframework.data
</groupId>
<artifactId>
ojdbc14
</artifactId>
<artifactId>
spring-data-commons
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
...
@@ -68,35 +73,16 @@
...
@@ -68,35 +73,16 @@
</exclusion>
</exclusion>
</exclusions>
</exclusions>
</dependency>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper-spring-boot-starter -->
<dependency>
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
<version>
1.3.0
</version>
</dependency>
</dependency>
<!--MyBatis分页插件-->
<dependency>
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
pagehelper
</artifactId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
<version>
3.0.2
</version>
<!--<!–Knife4j API文档生产工具–>-->
<!--<dependency>-->
<!--<groupId>com.github.xiaoymin</groupId>-->
<!--<artifactId>knife4j-micro-spring-boot-starter</artifactId>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>com.github.xiaoymin</groupId>-->
<!--<artifactId>knife4j-spring-boot-starter</artifactId>-->
<!--</dependency>-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<exclusions>
<!-- 去掉springboot默认配置 -->
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependency>
<!--redis-->
<!--redis-->
<dependency>
<dependency>
...
@@ -124,6 +110,7 @@
...
@@ -124,6 +110,7 @@
<artifactId>
mybatis-plus-extension
</artifactId>
<artifactId>
mybatis-plus-extension
</artifactId>
<version>
3.3.0
</version>
<version>
3.3.0
</version>
</dependency>
</dependency>
<!-- 代码生成器模板 -->
<!-- 代码生成器模板 -->
<dependency>
<dependency>
<groupId>
org.apache.velocity
</groupId>
<groupId>
org.apache.velocity
</groupId>
...
@@ -173,16 +160,21 @@
...
@@ -173,16 +160,21 @@
<artifactId>
poi-ooxml-schemas
</artifactId>
<artifactId>
poi-ooxml-schemas
</artifactId>
<version>
3.9
</version>
<version>
3.9
</version>
</dependency>
</dependency>
<!--
反射
-->
<!--
https://mvnrepository.com/artifact/cn.hutool/hutool-all
-->
<dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<artifactId>
hutool-all
</artifactId>
<version>
5.6.0
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
commons-io
</groupId>
<groupId>
commons-io
</groupId>
<artifactId>
commons-io
</artifactId>
<artifactId>
commons-io
</artifactId>
<version>
2.4
</version>
<version>
2.4
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
nafmii-common/src/main/java/org/nafmii/exception/BusinessExceptionHandler.java
View file @
9292bc5
package
org
.
nafmii
.
exception
;
package
org
.
nafmii
.
exception
;
import
feign.codec.DecodeException
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.nafmii.constant.MessageEnum
;
import
org.nafmii.constant.MessageEnum
;
import
org.nafmii.response.
Result
;
import
org.nafmii.response.
ApiResponse
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.http.converter.HttpMessageNotReadableException
;
import
org.springframework.http.converter.HttpMessageNotReadableException
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.BindingResult
;
...
@@ -12,8 +13,6 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
...
@@ -12,8 +13,6 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MaxUploadSizeExceededException
;
import
org.springframework.web.multipart.MaxUploadSizeExceededException
;
import
javax.websocket.DecodeException
;
@Order
(
Integer
.
MIN_VALUE
)
@Order
(
Integer
.
MIN_VALUE
)
@ControllerAdvice
@ControllerAdvice
@Slf4j
@Slf4j
...
@@ -24,9 +23,9 @@ public class BusinessExceptionHandler {
...
@@ -24,9 +23,9 @@ public class BusinessExceptionHandler {
*/
*/
@ExceptionHandler
(
value
=
Exception
.
class
)
@ExceptionHandler
(
value
=
Exception
.
class
)
@ResponseBody
@ResponseBody
public
Result
defaultErrorHandler
(
Exception
e
)
{
public
ApiResponse
defaultErrorHandler
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
return
new
Result
(
MessageEnum
.
FAIL
.
getCode
(),
e
.
getMessage
());
return
new
ApiResponse
(
MessageEnum
.
FAIL
.
getCode
(),
e
.
getMessage
());
}
}
/**
/**
...
@@ -36,9 +35,9 @@ public class BusinessExceptionHandler {
...
@@ -36,9 +35,9 @@ public class BusinessExceptionHandler {
*/
*/
@ExceptionHandler
(
value
=
BusinessException
.
class
)
@ExceptionHandler
(
value
=
BusinessException
.
class
)
@ResponseBody
@ResponseBody
public
Result
businessErrorHandler
(
BusinessException
e
)
{
public
ApiResponse
businessErrorHandler
(
BusinessException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
return
new
Result
(
new
Long
((
long
)
e
.
getStatusCode
()),
e
.
getMessage
());
return
new
ApiResponse
(
new
Long
((
long
)
e
.
getStatusCode
()),
e
.
getMessage
());
}
}
/**
/**
...
@@ -46,13 +45,13 @@ public class BusinessExceptionHandler {
...
@@ -46,13 +45,13 @@ public class BusinessExceptionHandler {
*/
*/
@ExceptionHandler
(
value
=
MethodArgumentNotValidException
.
class
)
@ExceptionHandler
(
value
=
MethodArgumentNotValidException
.
class
)
@ResponseBody
@ResponseBody
public
Result
argumentErrorHandler
(
MethodArgumentNotValidException
e
)
{
public
ApiResponse
argumentErrorHandler
(
MethodArgumentNotValidException
e
)
{
BindingResult
bindingResult
=
e
.
getBindingResult
();
BindingResult
bindingResult
=
e
.
getBindingResult
();
String
errorMessage
=
"参数不能为空!"
;
String
errorMessage
=
"参数不能为空!"
;
if
(
bindingResult
.
getFieldError
()
!=
null
){
if
(
bindingResult
.
getFieldError
()
!=
null
){
errorMessage
=
bindingResult
.
getFieldError
().
getDefaultMessage
();
errorMessage
=
bindingResult
.
getFieldError
().
getDefaultMessage
();
}
}
return
new
Result
(
MessageEnum
.
FAIL_PARAM
.
getCode
(),
errorMessage
);
return
new
ApiResponse
(
MessageEnum
.
FAIL_PARAM
.
getCode
(),
errorMessage
);
}
}
/**
/**
...
@@ -60,9 +59,9 @@ public class BusinessExceptionHandler {
...
@@ -60,9 +59,9 @@ public class BusinessExceptionHandler {
*/
*/
@ExceptionHandler
(
value
=
HttpMessageNotReadableException
.
class
)
@ExceptionHandler
(
value
=
HttpMessageNotReadableException
.
class
)
@ResponseBody
@ResponseBody
public
Result
argumentErrorHandler
(
HttpMessageNotReadableException
e
)
{
public
ApiResponse
argumentErrorHandler
(
HttpMessageNotReadableException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
return
new
Result
(
MessageEnum
.
FAIL_PARAM_TYPE
.
getCode
(),
MessageEnum
.
FAIL_PARAM_TYPE
.
getRemarks
());
return
new
ApiResponse
(
MessageEnum
.
FAIL_PARAM_TYPE
.
getCode
(),
MessageEnum
.
FAIL_PARAM_TYPE
.
getRemarks
());
}
}
/**
/**
...
@@ -70,9 +69,9 @@ public class BusinessExceptionHandler {
...
@@ -70,9 +69,9 @@ public class BusinessExceptionHandler {
*/
*/
@ExceptionHandler
(
value
=
DecodeException
.
class
)
@ExceptionHandler
(
value
=
DecodeException
.
class
)
@ResponseBody
@ResponseBody
public
Result
argumentErrorHandler
(
DecodeException
e
)
{
public
ApiResponse
argumentErrorHandler
(
DecodeException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
return
new
Result
(
MessageEnum
.
FEIGN_CLIENT_DECODE
.
getCode
(),
MessageEnum
.
FEIGN_CLIENT_DECODE
.
getRemarks
());
return
new
ApiResponse
(
MessageEnum
.
FEIGN_CLIENT_DECODE
.
getCode
(),
MessageEnum
.
FEIGN_CLIENT_DECODE
.
getRemarks
());
}
}
/**
/**
...
@@ -80,8 +79,8 @@ public class BusinessExceptionHandler {
...
@@ -80,8 +79,8 @@ public class BusinessExceptionHandler {
*/
*/
@ExceptionHandler
(
value
=
MaxUploadSizeExceededException
.
class
)
@ExceptionHandler
(
value
=
MaxUploadSizeExceededException
.
class
)
@ResponseBody
@ResponseBody
public
Result
argumentErrorHandler
(
MaxUploadSizeExceededException
e
)
{
public
ApiResponse
argumentErrorHandler
(
MaxUploadSizeExceededException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
return
new
Result
(
MessageEnum
.
MAX_FILE_SIZE
.
getCode
(),
MessageEnum
.
MAX_FILE_SIZE
.
getRemarks
());
return
new
ApiResponse
(
MessageEnum
.
MAX_FILE_SIZE
.
getCode
(),
MessageEnum
.
MAX_FILE_SIZE
.
getRemarks
());
}
}
}
}
nafmii-common/src/main/java/org/nafmii/param/BeanTransferUtils.java
0 → 100644
View file @
9292bc5
package
org
.
nafmii
.
param
;
import
com.github.pagehelper.Page
;
import
org.springframework.util.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
/**
* @author by zhangbr
* @date 2020/3/26.
*/
public
class
BeanTransferUtils
{
public
static
<
T
>
T
transfer
(
Object
text
,
Class
<
T
>
clazz
)
{
T
t
;
try
{
t
=
clazz
.
newInstance
();
if
(
text
!=
null
){
org
.
springframework
.
beans
.
BeanUtils
.
copyProperties
(
text
,
t
);
}
return
t
;
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
}
public
static
<
T
>
List
<
T
>
transferList
(
List
<?>
list
,
Class
<
T
>
clazz
)
{
if
(
CollectionUtils
.
isEmpty
(
list
)){
return
Collections
.
emptyList
();
}
List
<
T
>
result
=
new
ArrayList
<>();
for
(
Object
each
:
list
)
{
result
.
add
(
transfer
(
each
,
clazz
));
}
return
result
;
}
public
static
<
T
>
PageResult
<
T
>
toPagedResult
(
List
<?>
list
,
Class
<
T
>
clazz
)
{
PageResult
<
T
>
result
=
new
PageResult
();
if
(
list
instanceof
Page
)
{
Page
page
=
(
Page
)
list
;
result
.
setTotal
(
page
.
getTotal
());
}
else
if
(
list
!=
null
)
{
result
.
setTotal
((
long
)
list
.
size
());
}
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
result
.
setList
(
transferList
(
list
,
clazz
));
}
return
result
;
}
}
nafmii-common/src/main/java/org/nafmii/param/OrderBy.java
deleted
100644 → 0
View file @
9cec056
package
org
.
nafmii
.
param
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author by zhangbr
* @date 2020/4/13.
*/
@Data
public
class
OrderBy
{
@ApiModelProperty
(
value
=
"排序字段"
,
example
=
"createTime"
)
private
String
column
;
@ApiModelProperty
(
value
=
"排序方式(ASC:正序,DESC:倒序,默认:ASC)"
,
example
=
"ASC"
)
private
String
type
;
}
nafmii-common/src/main/java/org/nafmii/param/PageQuery.java
View file @
9292bc5
package
org
.
nafmii
.
param
;
package
org
.
nafmii
.
param
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author by zhangbr
@Data
* @date 2020/6/24.
*/
public
class
PageQuery
{
public
class
PageQuery
{
@ApiModelProperty
(
"页码"
)
@ApiModelProperty
(
"当前页码"
)
private
Integer
pageNo
=
1
;
private
Integer
pageNum
=
1
;
@ApiModelProperty
(
"每页显示条数,默认30"
)
@ApiModelProperty
(
"每页条数,默认10"
)
private
Integer
pageSize
=
30
;
private
Integer
pageSize
=
10
;
@ApiModelProperty
(
value
=
"是否分页,默认:true"
)
private
Boolean
isPage
=
true
;
@ApiModelProperty
(
value
=
"关键字"
)
public
Integer
getPageNum
()
{
private
String
key
;
return
pageNum
;
}
@ApiModelProperty
(
value
=
"排序集合"
)
public
void
setPageNum
(
Integer
pageNum
)
{
private
List
<
OrderBy
>
orderByList
;
this
.
pageNum
=
pageNum
;
}
@ApiModelProperty
(
value
=
"是否分页,默认:true"
)
public
Integer
getPageSize
()
{
private
Boolean
isPage
=
true
;
return
pageSize
;
}
@JsonIgnore
public
void
setPageSize
(
Integer
pageSize
)
{
private
Integer
maxPageSize
=
1000
;
this
.
pageSize
=
pageSize
;
}
@JsonIgnore
public
Boolean
getPage
()
{
public
<
T
>
Page
<
T
>
getPage
(){
return
isPage
;
if
(
isPage
){
return
new
Page
<>(
pageNo
<=
0
?
1
:
pageNo
,
pageSize
<=
0
?
10
:
pageSize
);
}
}
return
new
Page
<>(
0
,
maxPageSize
);
public
void
setPage
(
Boolean
page
)
{
isPage
=
page
;
}
}
}
}
nafmii-common/src/main/java/org/nafmii/param/PageResult.java
0 → 100644
View file @
9292bc5
package
org
.
nafmii
.
param
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.List
;
/**
* @author by zhangbr
* @date 2020/4/3.
*/
public
class
PageResult
<
T
>
{
@ApiModelProperty
(
"数据"
)
private
List
<
T
>
list
;
@ApiModelProperty
(
"总条数"
)
private
long
total
;
public
List
<
T
>
getList
()
{
return
list
;
}
public
void
setList
(
List
<
T
>
list
)
{
this
.
list
=
list
;
}
public
long
getTotal
()
{
return
total
;
}
public
void
setTotal
(
long
total
)
{
this
.
total
=
total
;
}
}
nafmii-common/src/main/java/org/nafmii/response/ApiResponse.java
0 → 100644
View file @
9292bc5
package
org
.
nafmii
.
response
;
import
java.io.Serializable
;
/**
* @author lvyp
* @date 2021/4/26
*/
public
class
ApiResponse
<
T
>
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
int
SUCCESS
=
0
;
public
static
final
int
FAIL
=
-
1
;
public
static
final
int
BUSY
=
-
100
;
public
static
final
String
SUCCESS_TEXT
=
"Success"
;
public
static
final
String
FAIL_TEXT
=
"Fail"
;
public
static
final
String
BUSY_TEXT
=
"Busy"
;
private
long
status
;
private
String
statusText
;
private
T
data
;
public
ApiResponse
()
{
this
.
status
=
0L
;
this
.
statusText
=
"Success"
;
}
public
ApiResponse
(
long
status
,
String
statusText
,
T
data
)
{
this
.
status
=
status
;
this
.
statusText
=
statusText
;
this
.
data
=
data
;
}
public
ApiResponse
(
long
status
,
String
statusText
)
{
this
.
status
=
status
;
this
.
statusText
=
statusText
;
}
public
ApiResponse
(
T
data
)
{
this
.
status
=
0L
;
this
.
statusText
=
"Success"
;
this
.
data
=
data
;
}
public
long
getStatus
()
{
return
this
.
status
;
}
public
void
setStatus
(
long
status
)
{
this
.
status
=
status
;
if
(
status
==
0L
)
{
this
.
statusText
=
"Success"
;
}
else
if
(
status
==
-
100L
)
{
this
.
statusText
=
"Busy"
;
}
else
{
this
.
statusText
=
""
;
}
}
public
String
getStatusText
()
{
return
this
.
statusText
;
}
public
void
setStatusText
(
String
statusText
)
{
this
.
statusText
=
statusText
;
}
public
Object
getData
()
{
return
this
.
data
;
}
public
void
setData
(
T
data
)
{
this
.
data
=
data
;
}
public
static
<
M
>
ApiResponse
<
M
>
ok
()
{
return
new
ApiResponse
();
}
public
static
<
T
>
ApiResponse
<
T
>
ok
(
T
data
)
{
return
new
ApiResponse
(
data
);
}
}
nafmii-common/src/main/java/org/nafmii/response/Result.java
deleted
100644 → 0
View file @
9cec056
package
org
.
nafmii
.
response
;
import
lombok.Data
;
import
org.nafmii.constant.MessageEnum
;
/**
* 通用返回对象
* Created by macro on 2019/4/19.
*/
@Data
public
class
Result
<
T
>
{
private
Long
code
;
private
String
message
;
private
T
data
;
public
Result
(){};
public
Result
(
Long
code
,
String
message
,
T
data
)
{
this
.
code
=
code
;
this
.
message
=
message
;
this
.
data
=
data
;
}
public
Result
(
Long
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
/**
* 成功返回结果
*
* @param data 获取的数据
*/
public
static
<
T
>
Result
<
T
>
success
(
T
data
)
{
return
new
Result
<
T
>(
MessageEnum
.
SUCCESS
.
getCode
(),
MessageEnum
.
SUCCESS
.
getRemarks
(),
data
);
}
/**
* 成功返回结果
*
* @param data 获取的数据
* @param message 提示信息
*/
public
static
<
T
>
Result
<
T
>
success
(
T
data
,
String
message
)
{
return
new
Result
<
T
>(
MessageEnum
.
SUCCESS
.
getCode
(),
message
,
data
);
}
/**
* 失败返回结果
* @param message 提示信息
*/
public
static
<
T
>
Result
<
T
>
failed
(
String
message
)
{
return
new
Result
<
T
>(
MessageEnum
.
FAIL
.
getCode
(),
message
,
null
);
}
/**
* 参数验证失败返回结果
*/
public
static
<
T
>
Result
<
T
>
validateFailed
()
{
return
new
Result
<
T
>(
MessageEnum
.
FAIL_PARAM_VALIDATE
.
getCode
(),
MessageEnum
.
FAIL_PARAM_VALIDATE
.
getRemarks
());
}
/**
* 参数验证失败返回结果
* @param message 提示信息
*/
public
static
<
T
>
Result
<
T
>
validateFailed
(
String
message
)
{
return
new
Result
<
T
>(
MessageEnum
.
FAIL_PARAM_VALIDATE
.
getCode
(),
message
,
null
);
}
/**
* 未登录返回结果
*/
public
static
<
T
>
Result
<
T
>
unauthorized
()
{
return
new
Result
<
T
>(
MessageEnum
.
NO_LOGIN
.
getCode
(),
MessageEnum
.
NO_LOGIN
.
getRemarks
());
}
}
nafmii-common/src/main/java/org/nafmii/response/Springs.java
0 → 100644
View file @
9292bc5
package
org
.
nafmii
.
response
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationEvent
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.context.event.ContextRefreshedEvent
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.Assert
;
/**
* @author lvyp
* @date 2021/4/26
*/
@Component
public
class
Springs
implements
ApplicationListener
{
@Autowired
private
ApplicationContext
applicationContext
;
private
static
ApplicationContext
context
;
public
Springs
()
{
}
public
void
onApplicationEvent
(
ApplicationEvent
applicationEvent
)
{
if
(
applicationEvent
instanceof
ContextRefreshedEvent
)
{
this
.
setContextStatic
();
}
}
private
synchronized
void
setContextStatic
()
{
context
=
this
.
applicationContext
;
}
public
static
<
T
>
T
getBean
(
Class
<?
extends
T
>
beanClass
,
String
beanName
)
{
assertContextNotNull
();
return
context
.
getBean
(
beanName
,
beanClass
);
}
public
static
Object
getBean
(
String
beanName
)
{
assertContextNotNull
();
return
context
.
getBean
(
beanName
);
}
public
static
<
T
>
T
getBean
(
Class
<?
extends
T
>
beanClass
)
{
assertContextNotNull
();
return
context
.
getBean
(
beanClass
);
}
private
static
void
assertContextNotNull
()
{
Assert
.
notNull
(
context
,
"The spring applicationContext was not initialized"
);
}
}
nafmii-common/src/main/java/org/nafmii/utils/BeanTransferUtils.java
View file @
9292bc5
package
org
.
nafmii
.
utils
;
package
org
.
nafmii
.
utils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.Page
;
import
org.nafmii.param.PageResult
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -12,11 +13,14 @@ import java.util.List;
...
@@ -12,11 +13,14 @@ import java.util.List;
* @date 2020/3/26.
* @date 2020/3/26.
*/
*/
public
class
BeanTransferUtils
{
public
class
BeanTransferUtils
{
public
static
<
T
>
T
transfer
(
Object
text
,
Class
<
T
>
clazz
)
{
public
static
<
T
>
T
transfer
(
Object
text
,
Class
<
T
>
clazz
)
{
T
t
;
T
t
;
try
{
try
{
t
=
clazz
.
newInstance
();
t
=
clazz
.
newInstance
();
if
(
text
!=
null
){
org
.
springframework
.
beans
.
BeanUtils
.
copyProperties
(
text
,
t
);
org
.
springframework
.
beans
.
BeanUtils
.
copyProperties
(
text
,
t
);
}
return
t
;
return
t
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
...
@@ -33,32 +37,19 @@ public class BeanTransferUtils {
...
@@ -33,32 +37,19 @@ public class BeanTransferUtils {
}
}
return
result
;
return
result
;
}
}
public
static
<
T
>
PageResult
<
T
>
toPagedResult
(
List
<?>
list
,
Class
<
T
>
clazz
)
{
public
static
<
T
>
PagedResult
<
T
>
toPagedResult
(
List
<
T
>
list
,
Page
page
)
{
PageResult
<
T
>
result
=
new
PageResult
();
PagedResult
<
T
>
result
=
new
PagedResult
<>();
if
(
list
instanceof
Page
)
{
if
(
list
!=
null
&&
!
list
.
isEmpty
()){
Page
page
=
(
Page
)
list
;
result
.
setList
(
list
);
if
(
page
!=
null
){
result
.
setTotal
(
page
.
getTotal
());
result
.
setTotal
(
page
.
getTotal
());
}
else
{
}
else
if
(
list
!=
null
)
{
result
.
setTotal
(
list
.
size
());
result
.
setTotal
((
long
)
list
.
size
());
}
}
return
result
;
}
}
public
static
<
T
>
PagedResult
<
T
>
toPagedResult
(
List
<?>
list
,
Class
<
T
>
clazz
,
Page
page
)
{
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
PagedResult
<
T
>
result
=
new
PagedResult
<>();
result
.
setList
(
transferList
(
list
,
clazz
));
if
(
page
!=
null
){
result
.
setTotal
(
page
.
getTotal
());
}
else
{
if
(
list
!=
null
){
result
.
setTotal
(
list
.
size
());
}
}
if
(
list
!=
null
&&
!
list
.
isEmpty
()){
result
.
setList
(
BeanTransferUtils
.
transferList
(
list
,
clazz
));
}
}
return
result
;
return
result
;
}
}
}
}
nafmii-common/src/main/java/org/nafmii/utils/PageResult.java
0 → 100644
View file @
9292bc5
package
org
.
nafmii
.
utils
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.List
;
/**
* @author by zhangbr
* @date 2020/4/3.
*/
public
class
PageResult
<
T
>
{
@ApiModelProperty
(
"数据"
)
private
List
<
T
>
list
;
@ApiModelProperty
(
"总条数"
)
private
long
total
;
public
List
<
T
>
getList
()
{
return
list
;
}
public
void
setList
(
List
<
T
>
list
)
{
this
.
list
=
list
;
}
public
long
getTotal
()
{
return
total
;
}
public
void
setTotal
(
long
total
)
{
this
.
total
=
total
;
}
}
nafmii-common/src/main/java/org/nafmii/utils/PagedResult.java
deleted
100644 → 0
View file @
9cec056
package
org
.
nafmii
.
utils
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
PagedResult
<
T
>
{
@ApiModelProperty
(
"数据"
)
private
List
<
T
>
list
;
@ApiModelProperty
(
"总条数"
)
private
long
total
;
}
nafmii-common/src/main/java/org/nafmii/utils/RequestUtils.java
View file @
9292bc5
...
@@ -11,6 +11,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
...
@@ -11,6 +11,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
public
class
RequestUtils
{
public
class
RequestUtils
{
public
static
HttpServletRequest
getRequest
()
{
public
static
HttpServletRequest
getRequest
()
{
...
...
nafmii-eureka/pom.xml
View file @
9292bc5
...
@@ -14,31 +14,31 @@
...
@@ -14,31 +14,31 @@
<description>
Demo project for Spring Boot
</description>
<description>
Demo project for Spring Boot
</description>
<properties>
<properties>
<java.version>
1.8
</java.version>
<java.version>
1.8
</java.version>
<spring-cloud.version>
2020.0.2
</spring-cloud.version>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-server
</artifactId>
<artifactId>
spring-cloud-starter-netflix-eureka-server
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<!--<!– https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies –>-->
<!--<dependency>-->
<!--<groupId>org.springframework.cloud</groupId>-->
<!--<artifactId>spring-cloud-dependencies</artifactId>-->
<!--<version>2020.0.1</version>-->
<!--<type>pom</type>-->
<!--<scope>runtime</scope>-->
<!--</dependency>-->
</dependencies>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
${spring-cloud.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<build>
<plugins>
<plugins>
...
...
nafmii-eureka/src/main/resources/application.properties
deleted
100644 → 0
View file @
9cec056
server.port
=
8761
eureka.client.serviceUrl.defaultZone
=
http://127.0.0.1:8761/eureka
eureka.client.register-with-
eureka
=
true
eureka.client.fetch-
registry
=
false
spring.application.name
=
nafmii-eureka
eureka.server.enable-self-
preservation
=
false
nafmii-eureka/src/main/resources/application.yml
0 → 100644
View file @
9292bc5
server
:
port
:
8761
eureka
:
instance
:
prefer-ip-address
:
true
instance-id
:
${spring.cloud.client.ip-address}:${server.port}
client
:
registerWithEureka
:
false
fetchRegistry
:
false
serviceUrl
:
defaultZone
:
http://${spring.cloud.client.ip-address}:${server.port}/eureka/
spring
:
application
:
name
:
eurka-server
\ No newline at end of file
\ No newline at end of file
nafmii-gateway/pom.xml
View file @
9292bc5
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<parent>
<groupId>
org.nafmii
</groupId>
<groupId>
org.nafmii
</groupId>
<artifactId>
nafmii-parent
</artifactId>
<artifactId>
nafmii-parent
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.nafmii
</groupId>
<groupId>
org.nafmii
</groupId>
<artifactId>
nafmii-gateway
</artifactId>
<artifactId>
nafmii-gateway
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
</version>
<name>
nafmii-gateway
</name>
<name>
nafmii-gateway
</name>
<description>
Demo
project for Spring Boot
</description>
<description>
nafmii-gateway
project for Spring Boot
</description>
<properties>
<properties>
<java.version>
1.8
</java.version>
<java.version>
8
</java.version>
<spring-cloud.version>
2020.0.2
</spring-cloud.version>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-gateway
</artifactId>
<artifactId>
spring-cloud-starter-gateway
</artifactId>
<exclusions>
<exclusions>
<
!--<exclusion>--
>
<
exclusion
>
<
!--<groupId>org.springframework.boot</groupId>--
>
<
groupId>
org.springframework.boot
</groupId
>
<
!--<artifactId>spring-boot-starter-web</artifactId>--
>
<
artifactId>
spring-boot-starter-web
</artifactId
>
<
!--</exclusion>--
>
<
/exclusion
>
<
!--<exclusion>--
>
<
exclusion
>
<
!--<groupId>org.springframework.boot</groupId>--
>
<
groupId>
org.springframework.boot
</groupId
>
<
!--<artifactId>spring-boot-starter-webflux</artifactId>--
>
<
artifactId>
spring-boot-starter-webflux
</artifactId
>
<
!--</exclusion>--
>
<
/exclusion
>
</exclusions>
</exclusions>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.nafmii
</groupId>
<groupId>
org.nafmii
</groupId>
<artifactId>
nafmii-common
</artifactId>
<artifactId>
nafmii-common
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
${spring-cloud.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
<build>
<build>
<plugins>
<plugins>
...
...
nafmii-gateway/src/main/java/org/nafmii/NafmiiGatewayApplication.java
View file @
9292bc5
...
@@ -2,10 +2,11 @@ package org.nafmii;
...
@@ -2,10 +2,11 @@ package org.nafmii;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
@SpringBootApplication
(
scanBasePackages
={
"org.nafmii"
,
"org.nafmii.exception"
})
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
},
scanBasePackages
={
"org.nafmii"
,
"org.nafmii.exception"
})
@Enable
Discovery
Client
@Enable
Eureka
Client
public
class
NafmiiGatewayApplication
{
public
class
NafmiiGatewayApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
nafmii-gateway/src/main/java/org/nafmii/config/AccessFilter.java
View file @
9292bc5
package
org
.
nafmii
.
config
;
package
org
.
nafmii
.
config
;
import
cn.hutool.core.date.DateTime
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
cn.hutool.log.Log
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
io.jsonwebtoken.Claims
;
import
io.micrometer.core.instrument.util.StringUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.nafmii.exception.BusinessException
;
import
org.nafmii.exception.BusinessException
;
import
org.nafmii.utils.JwtUtils
;
import
org.nafmii.utils.JwtUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.gateway.filter.GatewayFilterChain
;
import
org.springframework.cloud.gateway.filter.GatewayFilterChain
;
import
org.springframework.cloud.gateway.filter.GlobalFilter
;
import
org.springframework.cloud.gateway.filter.GlobalFilter
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.io.buffer.DataBuffer
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.server.reactive.ServerHttpResponse
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.AntPathMatcher
;
import
org.springframework.util.AntPathMatcher
;
import
org.springframework.web.server.ServerWebExchange
;
import
org.springframework.web.server.ServerWebExchange
;
import
reactor.core.publisher.Flux
;
import
reactor.core.publisher.Mono
;
import
reactor.core.publisher.Mono
;
import
java.nio.charset.StandardCharsets
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Set
;
/**
/**
* Created by zhangzhenfang on 2018/4/17.
* Created by zhangzhenfang on 2018/4/17.
*/
//
*/
@Slf4j
@Slf4j
@Component
@Component
public
class
AccessFilter
implements
GlobalFilter
,
Ordered
{
public
class
AccessFilter
implements
GlobalFilter
,
Ordered
{
private
String
[]
skipAuthUrls
;
private
ObjectMapper
objectMapper
;
@Autowired
@Autowired
private
AntPathMatcher
antPathMatcher
;
//路径匹配器
private
AntPathMatcher
antPathMatcher
;
//路径匹配器
@Override
@Override
public
Mono
<
Void
>
filter
(
ServerWebExchange
exchange
,
GatewayFilterChain
chain
)
{
public
Mono
<
Void
>
filter
(
ServerWebExchange
exchange
,
GatewayFilterChain
chain
)
{
String
url
=
exchange
.
getRequest
().
getURI
().
getPath
();
String
url
=
exchange
.
getRequest
().
getURI
().
getPath
();
//相关不需要的接口地址
//相关不需要的接口地址
String
skip
=
"
app/nafmii/test/search
"
;
String
skip
=
"
/auth/login
"
;
//跳过不需要验证的url
//跳过不需要验证的url
if
(
antPathMatcher
.
match
(
skip
,
url
)){
if
(
antPathMatcher
.
match
(
skip
,
url
)){
return
chain
.
filter
(
exchange
);
return
chain
.
filter
(
exchange
);
...
...
nafmii-gateway/src/main/resources/application.yml
View file @
9292bc5
server
:
server
:
port
:
8201
port
:
9000
#eureka.client.serviceUrl.defaultZone=http://127.0.0.1:8761/eureka
tomcat
:
uri-encoding
:
UTF-8
eureka
:
eureka
:
client
:
client
:
service-url
:
serviceUrl
:
defaultZone
:
http://127.0.0.1:8761/eureka
defaultZone
:
http://localhost:8761/eureka/
instance
:
prefer-ip-address
:
true
instance-id
:
${spring.cloud.client.ip-address}:${server.port}
spring
:
spring
:
application
:
name
:
gateway
cloud
:
cloud
:
gateway
:
gateway
:
discovery
:
discovery
:
locator
:
locator
:
enabled
:
true
enabled
:
true
lower-case-service-id
:
true
#使用小写service-id
lower-case-service-id
:
true
routes
:
#配置路由路径
routes
:
-
id
:
nafmii-admin
uri
:
lb://nafmii-admin
predicates
:
-
Path=/nafmii-admin/**
filters
:
-
StripPrefix=1
-
id
:
nafmii-app
-
id
:
nafmii-app
uri
:
lb://nafmii-app
uri
:
lb://nafmii-app
predicates
:
predicates
:
-
Path=/nafmii-app/**
-
Path=/nafmii-app/**
filters
:
filters
:
-
StripPrefix=1
-
StripPrefix=1
\ No newline at end of file
\ No newline at end of file
application
:
name
:
nafmii-gateway
management
:
#开启SpringBoot Admin的监控
endpoints
:
web
:
exposure
:
include
:
'
*'
endpoint
:
health
:
show-details
:
always
\ No newline at end of file
\ No newline at end of file
nafmii-gateway/src/test/java/org/nafmii/NafmiiGatewayApplicationTests.java
deleted
100644 → 0
View file @
9cec056
package
org
.
nafmii
;
import
org.junit.jupiter.api.Test
;
import
org.springframework.boot.test.context.SpringBootTest
;
@SpringBootTest
class
NafmiiGatewayApplicationTests
{
@Test
void
contextLoads
()
{
}
}
nafmii-mbg/pom.xml
View file @
9292bc5
...
@@ -14,42 +14,40 @@
...
@@ -14,42 +14,40 @@
<description>
Demo project for Spring Boot
</description>
<description>
Demo project for Spring Boot
</description>
<properties>
<properties>
<java.version>
1.8
</java.version>
<java.version>
1.8
</java.version>
<spring-cloud.version>
2020.0.2
</spring-cloud.version>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.mybatis.generator
</groupId>
<artifactId>
mybatis-generator-core
</artifactId>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.mybatis
</groupId>
<groupId>
org.nafmii
</groupId>
<artifactId>
mybatis
</artifactId>
<artifactId>
nafmii-common
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
</dependency>
<!--接口文档-->
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
mysql
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
8.0.20
</version>
</dependency>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
${spring-cloud.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
...
...
nafmii-mbg/src/main/java/org/nafmii/nafmiimbg/NafmiiMbgApplication.java
View file @
9292bc5
...
@@ -4,8 +4,6 @@ import org.mybatis.generator.api.MyBatisGenerator;
...
@@ -4,8 +4,6 @@ import org.mybatis.generator.api.MyBatisGenerator;
import
org.mybatis.generator.config.Configuration
;
import
org.mybatis.generator.config.Configuration
;
import
org.mybatis.generator.config.xml.ConfigurationParser
;
import
org.mybatis.generator.config.xml.ConfigurationParser
;
import
org.mybatis.generator.internal.DefaultShellCallback
;
import
org.mybatis.generator.internal.DefaultShellCallback
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
...
nafmii-mbg/src/main/java/org/nafmii/nafmiimbg/model/CenterRole.java
View file @
9292bc5
...
@@ -20,6 +20,12 @@ public class CenterRole implements Serializable {
...
@@ -20,6 +20,12 @@ public class CenterRole implements Serializable {
@ApiModelProperty
(
value
=
"启用禁用 0 启用 1禁用"
)
@ApiModelProperty
(
value
=
"启用禁用 0 启用 1禁用"
)
private
String
isEnable
;
private
String
isEnable
;
@ApiModelProperty
(
value
=
"创建人"
)
private
Long
createUserId
;
@ApiModelProperty
(
value
=
"修改人"
)
private
Long
updateUserId
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
public
Long
getId
()
{
...
@@ -62,6 +68,22 @@ public class CenterRole implements Serializable {
...
@@ -62,6 +68,22 @@ public class CenterRole implements Serializable {
this
.
isEnable
=
isEnable
;
this
.
isEnable
=
isEnable
;
}
}
public
Long
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Long
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Long
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Long
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
StringBuilder
sb
=
new
StringBuilder
();
...
@@ -73,6 +95,8 @@ public class CenterRole implements Serializable {
...
@@ -73,6 +95,8 @@ public class CenterRole implements Serializable {
sb
.
append
(
", creatTime="
).
append
(
creatTime
);
sb
.
append
(
", creatTime="
).
append
(
creatTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", isEnable="
).
append
(
isEnable
);
sb
.
append
(
", isEnable="
).
append
(
isEnable
);
sb
.
append
(
", createUserId="
).
append
(
createUserId
);
sb
.
append
(
", updateUserId="
).
append
(
updateUserId
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
return
sb
.
toString
();
...
...
nafmii-mbg/src/main/java/org/nafmii/nafmiimbg/model/CenterRoleExample.java
View file @
9292bc5
...
@@ -424,6 +424,126 @@ public class CenterRoleExample {
...
@@ -424,6 +424,126 @@ public class CenterRoleExample {
addCriterion
(
"IS_ENABLE not between"
,
value1
,
value2
,
"isEnable"
);
addCriterion
(
"IS_ENABLE not between"
,
value1
,
value2
,
"isEnable"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andCreateUserIdIsNull
()
{
addCriterion
(
"CREATE_USER_ID is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateUserIdIsNotNull
()
{
addCriterion
(
"CREATE_USER_ID is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"CREATE_USER_ID ="
,
value
,
"createUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"CREATE_USER_ID <>"
,
value
,
"createUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"CREATE_USER_ID >"
,
value
,
"createUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"CREATE_USER_ID >="
,
value
,
"createUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateUserIdLessThan
(
Long
value
)
{
addCriterion
(
"CREATE_USER_ID <"
,
value
,
"createUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"CREATE_USER_ID <="
,
value
,
"createUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"CREATE_USER_ID in"
,
values
,
"createUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"CREATE_USER_ID not in"
,
values
,
"createUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"CREATE_USER_ID between"
,
value1
,
value2
,
"createUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"CREATE_USER_ID not between"
,
value1
,
value2
,
"createUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateUserIdIsNull
()
{
addCriterion
(
"UPDATE_USER_ID is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateUserIdIsNotNull
()
{
addCriterion
(
"UPDATE_USER_ID is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"UPDATE_USER_ID ="
,
value
,
"updateUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"UPDATE_USER_ID <>"
,
value
,
"updateUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"UPDATE_USER_ID >"
,
value
,
"updateUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"UPDATE_USER_ID >="
,
value
,
"updateUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateUserIdLessThan
(
Long
value
)
{
addCriterion
(
"UPDATE_USER_ID <"
,
value
,
"updateUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"UPDATE_USER_ID <="
,
value
,
"updateUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"UPDATE_USER_ID in"
,
values
,
"updateUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"UPDATE_USER_ID not in"
,
values
,
"updateUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"UPDATE_USER_ID between"
,
value1
,
value2
,
"updateUserId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"UPDATE_USER_ID not between"
,
value1
,
value2
,
"updateUserId"
);
return
(
Criteria
)
this
;
}
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
nafmii-mbg/src/main/resources/org/nafmii/nafmiimbg/mapper/CenterRoleMapper.xml
View file @
9292bc5
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
<result
column=
"CREAT_TIME"
jdbcType=
"TIMESTAMP"
property=
"creatTime"
/>
<result
column=
"CREAT_TIME"
jdbcType=
"TIMESTAMP"
property=
"creatTime"
/>
<result
column=
"UPDATE_TIME"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"UPDATE_TIME"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"IS_ENABLE"
jdbcType=
"VARCHAR"
property=
"isEnable"
/>
<result
column=
"IS_ENABLE"
jdbcType=
"VARCHAR"
property=
"isEnable"
/>
<result
column=
"CREATE_USER_ID"
jdbcType=
"BIGINT"
property=
"createUserId"
/>
<result
column=
"UPDATE_USER_ID"
jdbcType=
"BIGINT"
property=
"updateUserId"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<where>
<where>
...
@@ -67,7 +69,7 @@
...
@@ -67,7 +69,7 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
ID, R_NAME, CREAT_TIME, UPDATE_TIME, IS_ENABLE
ID, R_NAME, CREAT_TIME, UPDATE_TIME, IS_ENABLE
, CREATE_USER_ID, UPDATE_USER_ID
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRoleExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRoleExample"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -101,9 +103,11 @@
...
@@ -101,9 +103,11 @@
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRole"
>
<insert
id=
"insert"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRole"
>
insert into CENTER_ROLE (ID, R_NAME, CREAT_TIME,
insert into CENTER_ROLE (ID, R_NAME, CREAT_TIME,
UPDATE_TIME, IS_ENABLE)
UPDATE_TIME, IS_ENABLE, CREATE_USER_ID,
UPDATE_USER_ID)
values (#{id,jdbcType=BIGINT}, #{rName,jdbcType=VARCHAR}, #{creatTime,jdbcType=TIMESTAMP},
values (#{id,jdbcType=BIGINT}, #{rName,jdbcType=VARCHAR}, #{creatTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{isEnable,jdbcType=VARCHAR})
#{updateTime,jdbcType=TIMESTAMP}, #{isEnable,jdbcType=VARCHAR}, #{createUserId,jdbcType=BIGINT},
#{updateUserId,jdbcType=BIGINT})
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRole"
>
<insert
id=
"insertSelective"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRole"
>
insert into CENTER_ROLE
insert into CENTER_ROLE
...
@@ -123,6 +127,12 @@
...
@@ -123,6 +127,12 @@
<if
test=
"isEnable != null"
>
<if
test=
"isEnable != null"
>
IS_ENABLE,
IS_ENABLE,
</if>
</if>
<if
test=
"createUserId != null"
>
CREATE_USER_ID,
</if>
<if
test=
"updateUserId != null"
>
UPDATE_USER_ID,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
...
@@ -140,6 +150,12 @@
...
@@ -140,6 +150,12 @@
<if
test=
"isEnable != null"
>
<if
test=
"isEnable != null"
>
#{isEnable,jdbcType=VARCHAR},
#{isEnable,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"createUserId != null"
>
#{createUserId,jdbcType=BIGINT},
</if>
<if
test=
"updateUserId != null"
>
#{updateUserId,jdbcType=BIGINT},
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRoleExample"
resultType=
"java.lang.Long"
>
<select
id=
"countByExample"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRoleExample"
resultType=
"java.lang.Long"
>
...
@@ -166,6 +182,12 @@
...
@@ -166,6 +182,12 @@
<if
test=
"record.isEnable != null"
>
<if
test=
"record.isEnable != null"
>
IS_ENABLE = #{record.isEnable,jdbcType=VARCHAR},
IS_ENABLE = #{record.isEnable,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.createUserId != null"
>
CREATE_USER_ID = #{record.createUserId,jdbcType=BIGINT},
</if>
<if
test=
"record.updateUserId != null"
>
UPDATE_USER_ID = #{record.updateUserId,jdbcType=BIGINT},
</if>
</set>
</set>
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
@@ -177,7 +199,9 @@
...
@@ -177,7 +199,9 @@
R_NAME = #{record.rName,jdbcType=VARCHAR},
R_NAME = #{record.rName,jdbcType=VARCHAR},
CREAT_TIME = #{record.creatTime,jdbcType=TIMESTAMP},
CREAT_TIME = #{record.creatTime,jdbcType=TIMESTAMP},
UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
IS_ENABLE = #{record.isEnable,jdbcType=VARCHAR}
IS_ENABLE = #{record.isEnable,jdbcType=VARCHAR},
CREATE_USER_ID = #{record.createUserId,jdbcType=BIGINT},
UPDATE_USER_ID = #{record.updateUserId,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
...
@@ -197,6 +221,12 @@
...
@@ -197,6 +221,12 @@
<if
test=
"isEnable != null"
>
<if
test=
"isEnable != null"
>
IS_ENABLE = #{isEnable,jdbcType=VARCHAR},
IS_ENABLE = #{isEnable,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"createUserId != null"
>
CREATE_USER_ID = #{createUserId,jdbcType=BIGINT},
</if>
<if
test=
"updateUserId != null"
>
UPDATE_USER_ID = #{updateUserId,jdbcType=BIGINT},
</if>
</set>
</set>
where ID = #{id,jdbcType=BIGINT}
where ID = #{id,jdbcType=BIGINT}
</update>
</update>
...
@@ -205,7 +235,9 @@
...
@@ -205,7 +235,9 @@
set R_NAME = #{rName,jdbcType=VARCHAR},
set R_NAME = #{rName,jdbcType=VARCHAR},
CREAT_TIME = #{creatTime,jdbcType=TIMESTAMP},
CREAT_TIME = #{creatTime,jdbcType=TIMESTAMP},
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
IS_ENABLE = #{isEnable,jdbcType=VARCHAR}
IS_ENABLE = #{isEnable,jdbcType=VARCHAR},
CREATE_USER_ID = #{createUserId,jdbcType=BIGINT},
UPDATE_USER_ID = #{updateUserId,jdbcType=BIGINT}
where ID = #{id,jdbcType=BIGINT}
where ID = #{id,jdbcType=BIGINT}
</update>
</update>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
nafmii-quartz/pom.xml
View file @
9292bc5
...
@@ -14,29 +14,15 @@
...
@@ -14,29 +14,15 @@
<description>
Demo project for Spring Boot
</description>
<description>
Demo project for Spring Boot
</description>
<properties>
<properties>
<java.version>
1.8
</java.version>
<java.version>
1.8
</java.version>
<spring-cloud.version>
2020.0.2
</spring-cloud.version>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<exclusions>
<!-- 去掉springboot默认配置 -->
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<!--Mysql数据库驱动-->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</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,22 +33,38 @@
...
@@ -47,22 +33,38 @@
<artifactId>
spring-boot-starter-quartz
</artifactId>
<artifactId>
spring-boot-starter-quartz
</artifactId>
</dependency>
</dependency>
<!--数据源-->
<!--数据源-->
<!-- https://mvnrepository.com/artifact/com.alibaba/druid-spring-boot-starter -->
<dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<groupId>
com.alibaba
</groupId>
<artifactId>
druid-spring-boot-starter
</artifactId>
<artifactId>
druid-spring-boot-starter
</artifactId>
<version>
1.2.6
</version>
</dependency>
<dependency>
<groupId>
org.nafmii
</groupId>
<artifactId>
nafmii-common
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
8.0.20
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependency>
<!--<dependency>-->
</dependencies>
<!--<groupId>org.mybatis</groupId>-->
<dependencyManagement>
<!--<artifactId>mybatis</artifactId>-->
<dependencies>
<!--</dependency>-->
<dependency>
<dependency>
<groupId>
org.mybatis
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
mybatis-spring
</artifactId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
1.3.2
</version>
<version>
${spring-cloud.version}
</version>
<scope>
compile
</scope>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
...
...
nafmii-quartz/src/main/java/org/nafmii/nafmiiquartz/NafmiiQuartzApplication.java
View file @
9292bc5
...
@@ -2,8 +2,10 @@ package org.nafmii.nafmiiquartz;
...
@@ -2,8 +2,10 @@ package org.nafmii.nafmiiquartz;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
@SpringBootApplication
@SpringBootApplication
@EnableEurekaClient
public
class
NafmiiQuartzApplication
{
public
class
NafmiiQuartzApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
nafmii-quartz/src/main/resources/application.yml
View file @
9292bc5
server
:
server
:
port
:
10900
port
:
8003
eureka
:
client
:
serviceUrl
:
defaultZone
:
http://localhost:8761/eureka/
instance
:
prefer-ip-address
:
true
instance-id
:
${spring.cloud.client.ip-address}:${server.port}
spring
:
spring
:
profiles
:
application
:
active
:
dev
name
:
nafimii-quartz
quartz
:
quartz
:
job-store-type
:
jdbc
#�־û������ݿ�
job-store-type
:
jdbc
properties
:
properties
:
org
:
org
:
quartz
:
quartz
:
datasource
:
datasource
:
# �°�������com.mysql.jdbc.Driver���Ϊcom.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
# ����Դ��Ҫ���ʱ�����ָ�������ʽ������� You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
url
:
jdbc:mysql://114.112.96.30:30029/NAFMII_2.1?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
url
:
jdbc:mysql://140.143.249.40:3306/edz?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
username
:
root
username
:
root
password
:
123456
password
:
Moxi123#
scheduler
:
scheduler
:
instancName
:
clusteredScheduler
instancName
:
clusteredScheduler
instanceId
:
AUTO
instanceId
:
AUTO
jobStore
:
jobStore
:
class
:
org.quartz.impl.jdbcjobstore.JobStoreTX
class
:
org.quartz.impl.jdbcjobstore.JobStoreTX
driverDelegateClass
:
org.quartz.impl.jdbcjobstore.StdJDBCDelegate
#StdJDBCDelegate˵��֧�ּ�Ⱥ
driverDelegateClass
:
org.quartz.impl.jdbcjobstore.StdJDBCDelegate
tablePrefix
:
QRTZ_
tablePrefix
:
QRTZ_
isClustered
:
true
isClustered
:
true
clusterCheckinInterval
:
1000
clusterCheckinInterval
:
1000
...
@@ -34,8 +38,8 @@ spring:
...
@@ -34,8 +38,8 @@ spring:
initialize-schema
:
always
initialize-schema
:
always
datasource
:
datasource
:
druid
:
druid
:
password
:
123456
password
:
Moxi123#
url
:
jdbc:mysql://1
40.143.249.40:3306/edz
?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
url
:
jdbc:mysql://1
14.112.96.30:30029/NAFMII_2.1
?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
username
:
root
username
:
root
type
:
com.alibaba.druid.pool.DruidDataSource
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
...
@@ -44,8 +48,8 @@ dynamic:
...
@@ -44,8 +48,8 @@ dynamic:
datasource
:
datasource
:
dm
:
dm
:
#dm数据源 在相应的方法上使用 @DataSource("dm")
#dm数据源 在相应的方法上使用 @DataSource("dm")
password
:
123456
password
:
Moxi123#
url
:
jdbc:mysql://1
40.143.249.40:3308/edz
?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
url
:
jdbc:mysql://1
14.112.96.30:30029/NAFMII_2.1
?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
username
:
root
username
:
root
#type: com.alibaba.druid.pool.DruidDataSource
#type: com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
pom.xml
View file @
9292bc5
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<parent>
<parent>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.
3.0.RELEASE
</version>
<version>
2.
4.5
</version>
<relativePath/>
<relativePath/>
</parent>
</parent>
...
@@ -27,171 +27,4 @@
...
@@ -27,171 +27,4 @@
<module>
nafmii-mbg
</module>
<module>
nafmii-mbg
</module>
</modules>
</modules>
<properties>
<java.version>
1.8
</java.version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<skipTests>
true
</skipTests>
<docker.host>
http://192.168.3.101:2375
</docker.host>
<docker.maven.plugin.version>
1.2.2
</docker.maven.plugin.version>
<java.version>
1.8
</java.version>
<spring-cloud.version>
Hoxton.SR5
</spring-cloud.version>
<spring-cloud-alibaba.version>
2.2.0.RELEASE
</spring-cloud-alibaba.version>
<pagehelper-starter.version>
1.3.0
</pagehelper-starter.version>
<pagehelper.version>
5.2.0
</pagehelper.version>
<druid.version>
1.1.23
</druid.version>
<hutool.version>
5.4.0
</hutool.version>
<mybatis-generator.version>
1.4.0
</mybatis-generator.version>
<mybatis.version>
3.5.5
</mybatis.version>
<mysql-connector.version>
8.0.20
</mysql-connector.version>
<spring-data-commons.version>
2.3.0.RELEASE
</spring-data-commons.version>
<jjwt.version>
0.9.1
</jjwt.version>
<aliyun-oss.version>
2.5.0
</aliyun-oss.version>
<logstash-logback.version>
5.3
</logstash-logback.version>
<admin-starter-server.version>
2.2.3
</admin-starter-server.version>
<minio.version>
7.1.0
</minio.version>
<knife4j.version>
2.0.4
</knife4j.version>
<nimbus-jose-jwt.version>
8.16
</nimbus-jose-jwt.version>
<mall-common.version>
1.0-SNAPSHOT
</mall-common.version>
<mall-mbg.version>
1.0-SNAPSHOT
</mall-mbg.version>
<ojdbc.version>
10.2.0.4
</ojdbc.version>
<swagger.version>
2.9.2
</swagger.version>
</properties>
<!--公共依赖-->
<dependencies>
<!--springboot相关依赖-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<!--日志门面-->
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-api
</artifactId>
</dependency>
<!--工具类-->
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
</dependency>
</dependencies>
<!--严格控制的依赖版本-->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.nafmii
</groupId>
<artifactId>
nafmii-common
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
<!--Spring Cloud 相关依赖-->
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
${spring-cloud.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<!--MyBatis分页插件starter-->
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
<version>
${pagehelper-starter.version}
</version>
</dependency>
<!--MyBatis分页插件-->
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper
</artifactId>
<version>
${pagehelper.version}
</version>
</dependency>
<!--集成druid连接池-->
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
druid-spring-boot-starter
</artifactId>
<version>
${druid.version}
</version>
</dependency>
<!--Hutool Java工具包-->
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<version>
${hutool.version}
</version>
</dependency>
<!-- MyBatis 生成器 -->
<dependency>
<groupId>
org.mybatis.generator
</groupId>
<artifactId>
mybatis-generator-core
</artifactId>
<version>
${mybatis-generator.version}
</version>
</dependency>
<!-- MyBatis-->
<dependency>
<groupId>
org.mybatis
</groupId>
<artifactId>
mybatis
</artifactId>
<version>
${mybatis.version}
</version>
</dependency>
<!--SpringData工具包-->
<dependency>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-commons
</artifactId>
<version>
${spring-data-commons.version}
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.oracle/ojdbc14 -->
<dependency>
<groupId>
com.oracle
</groupId>
<artifactId>
ojdbc14
</artifactId>
<version>
${ojdbc.version}
</version>
</dependency>
<!--JWT(Json Web Token)登录支持-->
<!--集成logstash-->
<dependency>
<groupId>
net.logstash.logback
</groupId>
<artifactId>
logstash-logback-encoder
</artifactId>
<version>
${logstash-logback.version}
</version>
</dependency>
<!--集成SpringBoot Admin监控-->
<dependency>
<groupId>
de.codecentric
</groupId>
<artifactId>
spring-boot-admin-starter-server
</artifactId>
<version>
${admin-starter-server.version}
</version>
</dependency>
<!--Mysql数据库驱动-->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
${mysql-connector.version}
</version>
</dependency>
<!--接口文档-->
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<version>
${swagger.version}
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
${swagger.version}
</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
</project>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment