parent
c775c8ecb6
commit
f643eeeade
42
README.md
42
README.md
|
@ -1,26 +1,26 @@
|
||||||
## 系统模块
|
## 系统模块
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
com.muyu
|
com.zhilian
|
||||||
├── muyu-ui // 前端框架 [80]
|
├── zhilian-ui // 前端框架 [80]
|
||||||
├── muyu-gateway // 网关模块 [8080]
|
├── zhilian-gateway // 网关模块 [8080]
|
||||||
├── muyu-auth // 认证中心 [9200]
|
├── zhilian-auth // 认证中心 [9200]
|
||||||
├── muyu-common // 通用模块
|
├── zhilian-common // 通用模块
|
||||||
│ └── muyu-common-core // 核心模块
|
│ └── zhilian-common-core // 核心模块
|
||||||
│ └── muyu-common-datascope // 权限范围
|
│ └── zhilian-common-datascope // 权限范围
|
||||||
│ └── muyu-common-datasource // 多数据源
|
│ └── zhilian-common-datasource // 多数据源
|
||||||
│ └── muyu-common-log // 日志记录
|
│ └── zhilian-common-log // 日志记录
|
||||||
│ └── muyu-common-redis // 缓存服务
|
│ └── zhilian-common-redis // 缓存服务
|
||||||
│ └── muyu-common-seata // 分布式事务
|
│ └── zhilian-common-seata // 分布式事务
|
||||||
│ └── muyu-common-security // 安全模块
|
│ └── zhilian-common-security // 安全模块
|
||||||
│ └── muyu-common-swagger // 系统接口
|
│ └── zhilian-common-swagger // 系统接口
|
||||||
│ └── muyu-common-system // 系统基础
|
│ └── zhilian-common-system // 系统基础
|
||||||
├── muyu-modules // 业务模块
|
├── zhilian-modules // 业务模块
|
||||||
│ └── muyu-system // 系统模块 [9201]
|
│ └── zhilian-system // 系统模块 [9201]
|
||||||
│ └── muyu-gen // 代码生成 [9202]
|
│ └── zhilian-gen // 代码生成 [9202]
|
||||||
│ └── muyu-job // 定时任务 [9203]
|
│ └── zhilian-job // 定时任务 [9203]
|
||||||
│ └── muyu-file // 文件服务 [9300]
|
│ └── zhilian-file // 文件服务 [9300]
|
||||||
├── muyu-visual // 图形化管理模块
|
├── zhilian-visual // 图形化管理模块
|
||||||
│ └── muyu-visual-monitor // 监控中心 [9100]
|
│ └── zhilian-visual-monitor // 监控中心 [9100]
|
||||||
├──pom.xml // 公共依赖
|
├──pom.xml // 公共依赖
|
||||||
~~~
|
~~~
|
||||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Auth<74><68><EFBFBD>̡<EFBFBD>
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../muyu-auth/target
|
cd ../zhilian-auth/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-auth.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar zhilian-auth.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Gateway<61><79><EFBFBD>̡<EFBFBD>
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../muyu-gateway/target
|
cd ../zhilian-gateway/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-gateway.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar zhilian-gateway.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-File<6C><65><EFBFBD>̡<EFBFBD>
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../muyu-modules/muyu-file/target
|
cd ../zhilian-modules/zhilian-file/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-modules-file.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar zhilian-modules-file.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-Gen<65><6E><EFBFBD>̡<EFBFBD>
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../muyu-modules/muyu-gen/target
|
cd ../zhilian-modules/zhilian-gen/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-modules-gen.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar zhilian-modules-gen.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-Job<6F><62><EFBFBD>̡<EFBFBD>
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../muyu-modules/muyu-job/target
|
cd ../zhilian-modules/zhilian-job/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-modules-job.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar zhilian-modules-job.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-System<65><6D><EFBFBD>̡<EFBFBD>
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../muyu-modules/muyu-system/target
|
cd ../zhilian-modules/zhilian-system/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-modules-system.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar zhilian-modules-system.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Monitor<6F><72><EFBFBD>̡<EFBFBD>
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../muyu-visual/muyu-monitor/target
|
cd ../zhilian-visual/zhilian-monitor/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-visual-monitor.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar zhilian-visual-monitor.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
|
|
|
@ -14,28 +14,28 @@ cp ../sql/ry_config_20220929.sql ./mysql/db
|
||||||
|
|
||||||
# copy html
|
# copy html
|
||||||
echo "begin copy html "
|
echo "begin copy html "
|
||||||
cp -r ../muyu-ui/dist/** ./nginx/html/dist
|
cp -r ../zhilian-ui/dist/** ./nginx/html/dist
|
||||||
|
|
||||||
|
|
||||||
# copy jar
|
# copy jar
|
||||||
echo "begin copy muyu-gateway "
|
echo "begin copy zhilian-gateway "
|
||||||
cp ../muyu-gateway/target/muyu-gateway.jar ./muyu/gateway/jar
|
cp ../zhilian-gateway/target/zhilian-gateway.jar ./zhilian/gateway/jar
|
||||||
|
|
||||||
echo "begin copy muyu-auth "
|
echo "begin copy zhilian-auth "
|
||||||
cp ../muyu-auth/target/muyu-auth.jar ./muyu/auth/jar
|
cp ../zhilian-auth/target/zhilian-auth.jar ./zhilian/auth/jar
|
||||||
|
|
||||||
echo "begin copy muyu-visual "
|
echo "begin copy zhilian-visual "
|
||||||
cp ../muyu-visual/muyu-monitor/target/muyu-visual-monitor.jar ./muyu/visual/monitor/jar
|
cp ../zhilian-visual/zhilian-monitor/target/zhilian-visual-monitor.jar ./zhilian/visual/monitor/jar
|
||||||
|
|
||||||
echo "begin copy muyu-modules-system "
|
echo "begin copy zhilian-modules-system "
|
||||||
cp ../muyu-modules/muyu-system/target/muyu-modules-system.jar ./muyu/modules/system/jar
|
cp ../zhilian-modules/zhilian-system/target/zhilian-modules-system.jar ./zhilian/modules/system/jar
|
||||||
|
|
||||||
echo "begin copy muyu-modules-file "
|
echo "begin copy zhilian-modules-file "
|
||||||
cp ../muyu-modules/muyu-file/target/muyu-modules-file.jar ./muyu/modules/file/jar
|
cp ../zhilian-modules/zhilian-file/target/zhilian-modules-file.jar ./zhilian/modules/file/jar
|
||||||
|
|
||||||
echo "begin copy muyu-modules-job "
|
echo "begin copy zhilian-modules-job "
|
||||||
cp ../muyu-modules/muyu-job/target/muyu-modules-job.jar ./muyu/modules/job/jar
|
cp ../zhilian-modules/zhilian-job/target/zhilian-modules-job.jar ./zhilian/modules/job/jar
|
||||||
|
|
||||||
echo "begin copy muyu-modules-gen "
|
echo "begin copy zhilian-modules-gen "
|
||||||
cp ../muyu-modules/muyu-gen/target/muyu-modules-gen.jar ./muyu/modules/gen/jar
|
cp ../zhilian-modules/zhilian-gen/target/zhilian-modules-gen.jar ./zhilian/modules/gen/jar
|
||||||
|
|
||||||
|
|
|
@ -26,12 +26,12 @@ port(){
|
||||||
|
|
||||||
# 启动基础环境(必须)
|
# 启动基础环境(必须)
|
||||||
base(){
|
base(){
|
||||||
docker-compose up -d muyu-mysql muyu-redis muyu-nacos
|
docker-compose up -d zhilian-mysql zhilian-redis zhilian-nacos
|
||||||
}
|
}
|
||||||
|
|
||||||
# 启动程序模块(必须)
|
# 启动程序模块(必须)
|
||||||
modules(){
|
modules(){
|
||||||
docker-compose up -d muyu-nginx muyu-gateway muyu-auth muyu-modules-system
|
docker-compose up -d zhilian-nginx zhilian-gateway zhilian-auth zhilian-modules-system
|
||||||
}
|
}
|
||||||
|
|
||||||
# 关闭所有环境/模块
|
# 关闭所有环境/模块
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
version : '3.8'
|
version : '3.8'
|
||||||
services:
|
services:
|
||||||
muyu-nacos:
|
zhilian-nacos:
|
||||||
container_name: muyu-nacos
|
container_name: zhilian-nacos
|
||||||
image: nacos/nacos-server
|
image: nacos/nacos-server
|
||||||
build:
|
build:
|
||||||
context: ./nacos
|
context: ./nacos
|
||||||
|
@ -15,9 +15,9 @@ services:
|
||||||
- "9848:9848"
|
- "9848:9848"
|
||||||
- "9849:9849"
|
- "9849:9849"
|
||||||
depends_on:
|
depends_on:
|
||||||
- muyu-mysql
|
- zhilian-mysql
|
||||||
muyu-mysql:
|
zhilian-mysql:
|
||||||
container_name: muyu-mysql
|
container_name: zhilian-mysql
|
||||||
image: mysql:5.7
|
image: mysql:5.7
|
||||||
build:
|
build:
|
||||||
context: ./mysql
|
context: ./mysql
|
||||||
|
@ -38,103 +38,103 @@ services:
|
||||||
environment:
|
environment:
|
||||||
MYSQL_DATABASE: 'ry-cloud'
|
MYSQL_DATABASE: 'ry-cloud'
|
||||||
MYSQL_ROOT_PASSWORD: password
|
MYSQL_ROOT_PASSWORD: password
|
||||||
muyu-redis:
|
zhilian-redis:
|
||||||
container_name: muyu-redis
|
container_name: zhilian-redis
|
||||||
image: redis
|
image: redis
|
||||||
build:
|
build:
|
||||||
context: ./redis
|
context: ./redis
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
volumes:
|
volumes:
|
||||||
- ./redis/conf/redis.conf:/home/muyu/redis/redis.conf
|
- ./redis/conf/redis.conf:/home/zhilian/redis/redis.conf
|
||||||
- ./redis/data:/data
|
- ./redis/data:/data
|
||||||
command: redis-server /home/muyu/redis/redis.conf
|
command: redis-server /home/zhilian/redis/redis.conf
|
||||||
muyu-nginx:
|
zhilian-nginx:
|
||||||
container_name: muyu-nginx
|
container_name: zhilian-nginx
|
||||||
image: nginx
|
image: nginx
|
||||||
build:
|
build:
|
||||||
context: ./nginx
|
context: ./nginx
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/html/dist:/home/muyu/projects/muyu-ui
|
- ./nginx/html/dist:/home/zhilian/projects/zhilian-ui
|
||||||
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||||
- ./nginx/logs:/var/log/nginx
|
- ./nginx/logs:/var/log/nginx
|
||||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||||
depends_on:
|
depends_on:
|
||||||
- muyu-gateway
|
- zhilian-gateway
|
||||||
links:
|
links:
|
||||||
- muyu-gateway
|
- zhilian-gateway
|
||||||
muyu-gateway:
|
zhilian-gateway:
|
||||||
container_name: muyu-gateway
|
container_name: zhilian-gateway
|
||||||
build:
|
build:
|
||||||
context: ./muyu/gateway
|
context: ./zhilian/gateway
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
depends_on:
|
depends_on:
|
||||||
- muyu-redis
|
- zhilian-redis
|
||||||
links:
|
links:
|
||||||
- muyu-redis
|
- zhilian-redis
|
||||||
muyu-auth:
|
zhilian-auth:
|
||||||
container_name: muyu-auth
|
container_name: zhilian-auth
|
||||||
build:
|
build:
|
||||||
context: ./muyu/auth
|
context: ./zhilian/auth
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "9200:9200"
|
- "9200:9200"
|
||||||
depends_on:
|
depends_on:
|
||||||
- muyu-redis
|
- zhilian-redis
|
||||||
links:
|
links:
|
||||||
- muyu-redis
|
- zhilian-redis
|
||||||
muyu-modules-system:
|
zhilian-modules-system:
|
||||||
container_name: muyu-modules-system
|
container_name: zhilian-modules-system
|
||||||
build:
|
build:
|
||||||
context: ./muyu/modules/system
|
context: ./zhilian/modules/system
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "9201:9201"
|
- "9201:9201"
|
||||||
depends_on:
|
depends_on:
|
||||||
- muyu-redis
|
- zhilian-redis
|
||||||
- muyu-mysql
|
- zhilian-mysql
|
||||||
links:
|
links:
|
||||||
- muyu-redis
|
- zhilian-redis
|
||||||
- muyu-mysql
|
- zhilian-mysql
|
||||||
muyu-modules-gen:
|
zhilian-modules-gen:
|
||||||
container_name: muyu-modules-gen
|
container_name: zhilian-modules-gen
|
||||||
build:
|
build:
|
||||||
context: ./muyu/modules/gen
|
context: ./zhilian/modules/gen
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "9202:9202"
|
- "9202:9202"
|
||||||
depends_on:
|
depends_on:
|
||||||
- muyu-mysql
|
- zhilian-mysql
|
||||||
links:
|
links:
|
||||||
- muyu-mysql
|
- zhilian-mysql
|
||||||
muyu-modules-job:
|
zhilian-modules-job:
|
||||||
container_name: muyu-modules-job
|
container_name: zhilian-modules-job
|
||||||
build:
|
build:
|
||||||
context: ./muyu/modules/job
|
context: ./zhilian/modules/job
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "9203:9203"
|
- "9203:9203"
|
||||||
depends_on:
|
depends_on:
|
||||||
- muyu-mysql
|
- zhilian-mysql
|
||||||
links:
|
links:
|
||||||
- muyu-mysql
|
- zhilian-mysql
|
||||||
muyu-modules-file:
|
zhilian-modules-file:
|
||||||
container_name: muyu-modules-file
|
container_name: zhilian-modules-file
|
||||||
build:
|
build:
|
||||||
context: ./muyu/modules/file
|
context: ./zhilian/modules/file
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "9300:9300"
|
- "9300:9300"
|
||||||
volumes:
|
volumes:
|
||||||
- ./muyu/uploadPath:/home/muyu/uploadPath
|
- ./zhilian/uploadPath:/home/zhilian/uploadPath
|
||||||
muyu-visual-monitor:
|
zhilian-visual-monitor:
|
||||||
container_name: muyu-visual-monitor
|
container_name: zhilian-visual-monitor
|
||||||
build:
|
build:
|
||||||
context: ./muyu/visual/monitor
|
context: ./zhilian/visual/monitor
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "9100:9100"
|
- "9100:9100"
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER muyu
|
MAINTAINER zhilian
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/muyu
|
VOLUME /home/zhilian
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/muyu
|
RUN mkdir -p /home/zhilian
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/muyu
|
WORKDIR /home/zhilian
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/muyu-auth.jar /home/muyu/muyu-auth.jar
|
COPY ./jar/zhilian-auth.jar /home/zhilian/zhilian-auth.jar
|
||||||
# 启动认证服务
|
# 启动认证服务
|
||||||
ENTRYPOINT ["java","-jar","muyu-auth.jar"]
|
ENTRYPOINT ["java","-jar","zhilianzhilian-auth.jar"]
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER muyu
|
MAINTAINER zhilian
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/muyu
|
VOLUME /home/zhilian
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/muyu
|
RUN mkdir -p /home/zhilian
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/muyu
|
WORKDIR /home/zhilian
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/muyu-gateway.jar /home/muyu/muyu-gateway.jar
|
COPY ./jar/zhilian-gateway.jar /home/zhilian/zhilian-gateway.jar
|
||||||
# 启动网关服务
|
# 启动网关服务
|
||||||
ENTRYPOINT ["java","-jar","muyu-gateway.jar"]
|
ENTRYPOINT ["java","-jar","zhilianzhilian-gateway.jar"]
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER muyu
|
MAINTAINER zhilian
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/muyu
|
VOLUME /home/zhilian
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/muyu
|
RUN mkdir -p /home/zhilian
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/muyu
|
WORKDIR /home/zhilian
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/muyu-modules-file.jar /home/muyu/muyu-modules-file.jar
|
COPY ./jar/zhilian-modules-file.jar /home/zhilian/zhilian-modules-file.jar
|
||||||
# 启动文件服务
|
# 启动文件服务
|
||||||
ENTRYPOINT ["java","-jar","muyu-modules-file.jar"]
|
ENTRYPOINT ["java","-jar","zhilian-modules-file.jar"]
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER muyu
|
MAINTAINER zhilian
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/muyu
|
VOLUME /home/zhilian
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/muyu
|
RUN mkdir -p /home/zhilian
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/muyu
|
WORKDIR /home/zhilian
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/muyu-modules-gen.jar /home/muyu/muyu-modules-gen.jar
|
COPY ./jar/zhilian-modules-gen.jar /home/zhilian/zhilian-modules-gen.jar
|
||||||
# 启动代码生成服务
|
# 启动代码生成服务
|
||||||
ENTRYPOINT ["java","-jar","muyu-modules-gen.jar"]
|
ENTRYPOINT ["java","-jar","zhilian-modules-gen.jar"]
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER muyu
|
MAINTAINER zhilian
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/muyu
|
VOLUME /home/zhilian
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/muyu
|
RUN mkdir -p /home/zhilian
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/muyu
|
WORKDIR /home/zhilian
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/muyu-modules-job.jar /home/muyu/muyu-modules-job.jar
|
COPY ./jar/zhilian-modules-job.jar /home/zhilian/zhilian-modules-job.jar
|
||||||
# 启动定时任务服务
|
# 启动定时任务服务
|
||||||
ENTRYPOINT ["java","-jar","muyu-modules-job.jar"]
|
ENTRYPOINT ["java","-jar","zhilian-modules-job.jar"]
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER muyu
|
MAINTAINER zhilian
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/muyu
|
VOLUME /home/zhilian
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/muyu
|
RUN mkdir -p /home/zhilian
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/muyu
|
WORKDIR /home/zhilian
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/muyu-modules-system.jar /home/muyu/muyu-modules-system.jar
|
COPY ./jar/zhilian-modules-system.jar /home/zhilian/zhilian-modules-system.jar
|
||||||
# 启动系统服务
|
# 启动系统服务
|
||||||
ENTRYPOINT ["java","-jar","muyu-modules-system.jar"]
|
ENTRYPOINT ["java","-jar","zhilian-modules-system.jar"]
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER muyu
|
MAINTAINER zhilian
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/muyu
|
VOLUME /home/zhilian
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/muyu
|
RUN mkdir -p /home/zhilian
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/muyu
|
WORKDIR /home/zhilian
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/muyu-visual-monitor.jar /home/muyu/muyu-visual-monitor.jar
|
COPY ./jar/zhilian-visual-monitor.jar /home/zhilian/zhilian-visual-monitor.jar
|
||||||
# 启动系统服务
|
# 启动系统服务
|
||||||
ENTRYPOINT ["java","-jar","muyu-visual-monitor.jar"]
|
ENTRYPOINT ["java","-jar","zhilian-visual-monitor.jar"]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM mysql:5.7
|
FROM mysql:5.7
|
||||||
# author
|
# author
|
||||||
MAINTAINER muyu
|
MAINTAINER zhilian
|
||||||
|
|
||||||
# 执行sql脚本
|
# 执行sql脚本
|
||||||
ADD ./db/*.sql /docker-entrypoint-initdb.d/
|
ADD ./db/*.sql /docker-entrypoint-initdb.d/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
spring.datasource.platform=mysql
|
spring.datasource.platform=mysql
|
||||||
db.num=1
|
db.num=1
|
||||||
db.url.0=jdbc:mysql://muyu-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
db.url.0=jdbc:mysql://zhilian-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||||||
db.user=root
|
db.user=root
|
||||||
db.password=password
|
db.password=password
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ management.metrics.export.influx.enabled=false
|
||||||
server.tomcat.accesslog.enabled=true
|
server.tomcat.accesslog.enabled=true
|
||||||
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
|
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
|
||||||
|
|
||||||
server.tomcat.basedir=/home/muyu/nacos/tomcat/logs
|
server.tomcat.basedir=/home/zhilian/nacos/tomcat/logs
|
||||||
|
|
||||||
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM nacos/nacos-server
|
FROM nacos/nacos-server
|
||||||
# author
|
# author
|
||||||
MAINTAINER muyu
|
MAINTAINER zhilian
|
||||||
|
|
||||||
# 复制conf文件到路径
|
# 复制conf文件到路径
|
||||||
COPY ./conf/application.properties /home/nacos/conf/application.properties
|
COPY ./conf/application.properties /home/nacos/conf/application.properties
|
||||||
|
|
|
@ -15,7 +15,7 @@ http {
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /home/muyu/projects/muyu-ui;
|
root /home/zhilian/projects/zhilian-ui;
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ http {
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header REMOTE-HOST $remote_addr;
|
proxy_set_header REMOTE-HOST $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_pass http://muyu-gateway:8080/;
|
proxy_pass http://zhilian-gateway:8080/;
|
||||||
}
|
}
|
||||||
|
|
||||||
# 避免actuator暴露
|
# 避免actuator暴露
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM nginx
|
FROM nginx
|
||||||
# author
|
# author
|
||||||
MAINTAINER muyu
|
MAINTAINER zhilian
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/muyu/projects/muyu-ui
|
VOLUME /home/zhilian/projects/zhilian-ui
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/muyu/projects/muyu-ui
|
RUN mkdir -p /home/zhilian/projects/zhilian-ui
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/muyu/projects/muyu-ui
|
WORKDIR /home/zhilian/projects/zhilian-ui
|
||||||
# 复制conf文件到路径
|
# 复制conf文件到路径
|
||||||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||||
# 复制html文件到路径
|
# 复制html文件到路径
|
||||||
COPY ./html/dist /home/muyu/projects/muyu-ui
|
COPY ./html/dist /home/zhilian/projects/zhilian-ui
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM redis
|
FROM redis
|
||||||
# author
|
# author
|
||||||
MAINTAINER muyu
|
MAINTAINER zhilian
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/muyu/redis
|
VOLUME /home/zhilian/redis
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/muyu/redis
|
RUN mkdir -p /home/zhilian/redis
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/muyu/redis
|
WORKDIR /home/zhilian/redis
|
||||||
# 复制conf文件到路径
|
# 复制conf文件到路径
|
||||||
COPY ./conf/redis.conf /home/muyu/redis/redis.conf
|
COPY ./conf/redis.conf /home/zhilian/redis/redis.conf
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
package com.muyu.common.core.constant;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 服务名称
|
|
||||||
*
|
|
||||||
* @author muyu
|
|
||||||
*/
|
|
||||||
public class ServiceNameConstants {
|
|
||||||
/**
|
|
||||||
* 认证服务的serviceid
|
|
||||||
*/
|
|
||||||
public static final String AUTH_SERVICE = "muyu-auth";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 系统模块的serviceid
|
|
||||||
*/
|
|
||||||
public static final String SYSTEM_SERVICE = "muyu-system";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件服务的serviceid
|
|
||||||
*/
|
|
||||||
public static final String FILE_SERVICE = "muyu-file";
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
com.muyu.common.core.utils.SpringUtils
|
|
|
@ -1 +0,0 @@
|
||||||
com.muyu.common.datascope.aspect.DataScopeAspect
|
|
|
@ -1,2 +0,0 @@
|
||||||
com.muyu.common.log.service.AsyncLogService
|
|
||||||
com.muyu.common.log.aspect.LogAspect
|
|
|
@ -1,2 +0,0 @@
|
||||||
com.muyu.common.redis.configure.RedisConfig
|
|
||||||
com.muyu.common.redis.service.RedisService
|
|
|
@ -1,5 +0,0 @@
|
||||||
com.muyu.common.security.config.WebMvcConfig
|
|
||||||
com.muyu.common.security.service.TokenService
|
|
||||||
com.muyu.common.security.aspect.PreAuthorizeAspect
|
|
||||||
com.muyu.common.security.aspect.InnerAuthAspect
|
|
||||||
com.muyu.common.security.handler.GlobalExceptionHandler
|
|
|
@ -1,3 +0,0 @@
|
||||||
# com.muyu.common.swagger.config.SwaggerAutoConfiguration
|
|
||||||
# com.muyu.common.swagger.config.SwaggerWebConfiguration
|
|
||||||
# com.muyu.common.swagger.config.SwaggerBeanPostProcessor
|
|
|
@ -1,3 +0,0 @@
|
||||||
com.muyu.common.system.remote.factory.RemoteUserFallbackFactory
|
|
||||||
com.muyu.common.system.remote.factory.RemoteLogFallbackFactory
|
|
||||||
com.muyu.common.system.remote.factory.RemoteFileFallbackFactory
|
|
|
@ -1,30 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<parent>
|
|
||||||
<groupId>com.muyu</groupId>
|
|
||||||
<artifactId>smart-cloud-server</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<modules>
|
|
||||||
<module>muyu-common-log</module>
|
|
||||||
<module>muyu-common-core</module>
|
|
||||||
<module>muyu-common-redis</module>
|
|
||||||
<module>muyu-common-seata</module>
|
|
||||||
<module>muyu-common-swagger</module>
|
|
||||||
<module>muyu-common-security</module>
|
|
||||||
<module>muyu-common-datascope</module>
|
|
||||||
<module>muyu-common-datasource</module>
|
|
||||||
<module>muyu-common-system</module>
|
|
||||||
</modules>
|
|
||||||
|
|
||||||
<artifactId>muyu-common</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
<description>
|
|
||||||
muyu-common通用模块
|
|
||||||
</description>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,22 +0,0 @@
|
||||||
package com.muyu.gen;
|
|
||||||
|
|
||||||
import com.muyu.common.security.annotation.EnableCustomConfig;
|
|
||||||
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
|
||||||
import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代码生成
|
|
||||||
*
|
|
||||||
* @author muyu
|
|
||||||
*/
|
|
||||||
@EnableCustomConfig
|
|
||||||
@EnableCustomSwagger2
|
|
||||||
@EnableMyFeignClients
|
|
||||||
@SpringBootApplication
|
|
||||||
public class MuYuGenApplication {
|
|
||||||
public static void main (String[] args) {
|
|
||||||
SpringApplication.run(MuYuGenApplication.class, args);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
package com.muyu.job;
|
|
||||||
|
|
||||||
import com.muyu.common.security.annotation.EnableCustomConfig;
|
|
||||||
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
|
||||||
import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 定时任务
|
|
||||||
*
|
|
||||||
* @author muyu
|
|
||||||
*/
|
|
||||||
@EnableCustomConfig
|
|
||||||
@EnableCustomSwagger2
|
|
||||||
@EnableMyFeignClients
|
|
||||||
@SpringBootApplication
|
|
||||||
public class MuYuJobApplication {
|
|
||||||
public static void main (String[] args) {
|
|
||||||
SpringApplication.run(MuYuJobApplication.class, args);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
package com.muyu.system;
|
|
||||||
|
|
||||||
import com.muyu.common.security.annotation.EnableCustomConfig;
|
|
||||||
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
|
||||||
import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 系统模块
|
|
||||||
*
|
|
||||||
* @author muyu
|
|
||||||
*/
|
|
||||||
@EnableCustomConfig
|
|
||||||
@EnableCustomSwagger2
|
|
||||||
@EnableMyFeignClients
|
|
||||||
@SpringBootApplication
|
|
||||||
public class MuYuSystemApplication {
|
|
||||||
public static void main (String[] args) {
|
|
||||||
SpringApplication.run(MuYuSystemApplication.class, args);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,74 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
|
||||||
<!-- 日志存放路径 -->
|
|
||||||
<property name="log.path" value="logs/muyu-system"/>
|
|
||||||
<!-- 日志输出格式 -->
|
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统日志输出 -->
|
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/info.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>INFO</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>ERROR</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统模块日志级别控制 -->
|
|
||||||
<logger name="com.muyu" level="info"/>
|
|
||||||
<!-- Spring日志级别控制 -->
|
|
||||||
<logger name="org.springframework" level="warn"/>
|
|
||||||
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</root>
|
|
||||||
|
|
||||||
<!--系统操作日志-->
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="file_info"/>
|
|
||||||
<appender-ref ref="file_error"/>
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
|
@ -1,25 +0,0 @@
|
||||||
# Tomcat
|
|
||||||
server:
|
|
||||||
port: 9100
|
|
||||||
|
|
||||||
# Spring
|
|
||||||
spring:
|
|
||||||
application:
|
|
||||||
# 应用名称
|
|
||||||
name: muyu-monitor
|
|
||||||
profiles:
|
|
||||||
# 环境配置
|
|
||||||
active: dev
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
discovery:
|
|
||||||
# 服务注册地址
|
|
||||||
server-addr: 127.0.0.1:8848
|
|
||||||
config:
|
|
||||||
# 配置中心地址
|
|
||||||
server-addr: 127.0.0.1:8848
|
|
||||||
# 配置文件格式
|
|
||||||
file-extension: yml
|
|
||||||
# 共享配置
|
|
||||||
shared-configs:
|
|
||||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
|
|
@ -1,74 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
|
||||||
<!-- 日志存放路径 -->
|
|
||||||
<property name="log.path" value="logs/muyu-visual-monitor"/>
|
|
||||||
<!-- 日志输出格式 -->
|
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统日志输出 -->
|
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/info.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>INFO</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>ERROR</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统模块日志级别控制 -->
|
|
||||||
<logger name="com.muyu" level="info"/>
|
|
||||||
<!-- Spring日志级别控制 -->
|
|
||||||
<logger name="org.springframework" level="warn"/>
|
|
||||||
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</root>
|
|
||||||
|
|
||||||
<!--系统操作日志-->
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="file_info"/>
|
|
||||||
<appender-ref ref="file_error"/>
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
84
pom.xml
84
pom.xml
|
@ -4,16 +4,16 @@
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.zhilian</groupId>
|
||||||
<artifactId>smart-cloud-server</artifactId>
|
<artifactId>smart-cloud-server</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
|
|
||||||
<name>muyu</name>
|
<name>zhilian</name>
|
||||||
|
|
||||||
<description>微服务系统</description>
|
<description>微服务系统</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<muyu.version>3.6.3</muyu.version>
|
<zhilian.version>3.6.3</zhilian.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>17</java.version>
|
<java.version>17</java.version>
|
||||||
|
@ -35,6 +35,7 @@
|
||||||
<minio.version>8.2.2</minio.version>
|
<minio.version>8.2.2</minio.version>
|
||||||
<poi.version>4.1.2</poi.version>
|
<poi.version>4.1.2</poi.version>
|
||||||
<transmittable-thread-local.version>2.14.3</transmittable-thread-local.version>
|
<transmittable-thread-local.version>2.14.3</transmittable-thread-local.version>
|
||||||
|
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- 依赖声明 -->
|
<!-- 依赖声明 -->
|
||||||
|
@ -145,76 +146,76 @@
|
||||||
|
|
||||||
<!-- 核心模块 -->
|
<!-- 核心模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.zhilian</groupId>
|
||||||
<artifactId>muyu-common-core</artifactId>
|
<artifactId>zhilian-common-core</artifactId>
|
||||||
<version>${muyu.version}</version>
|
<version>${zhilian.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 接口模块 -->
|
<!-- 接口模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.zhilian</groupId>
|
||||||
<artifactId>muyu-common-swagger</artifactId>
|
<artifactId>zhilian-common-swagger</artifactId>
|
||||||
<version>${muyu.version}</version>
|
<version>${zhilian.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 安全模块 -->
|
<!-- 安全模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.zhilian</groupId>
|
||||||
<artifactId>muyu-common-security</artifactId>
|
<artifactId>zhilian-common-security</artifactId>
|
||||||
<version>${muyu.version}</version>
|
<version>${zhilian.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 权限范围 -->
|
<!-- 权限范围 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.zhilian</groupId>
|
||||||
<artifactId>muyu-common-datascope</artifactId>
|
<artifactId>zhilian-common-datascope</artifactId>
|
||||||
<version>${muyu.version}</version>
|
<version>${zhilian.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 多数据源 -->
|
<!-- 多数据源 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.zhilian</groupId>
|
||||||
<artifactId>muyu-common-datasource</artifactId>
|
<artifactId>zhilian-common-datasource</artifactId>
|
||||||
<version>${muyu.version}</version>
|
<version>${zhilian.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 分布式事务 -->
|
<!-- 分布式事务 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.zhilian</groupId>
|
||||||
<artifactId>muyu-common-seata</artifactId>
|
<artifactId>zhilian-common-seata</artifactId>
|
||||||
<version>${muyu.version}</version>
|
<version>${zhilian.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 日志记录 -->
|
<!-- 日志记录 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.zhilian</groupId>
|
||||||
<artifactId>muyu-common-log</artifactId>
|
<artifactId>zhilian-common-log</artifactId>
|
||||||
<version>${muyu.version}</version>
|
<version>${zhilian.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 缓存服务 -->
|
<!-- 缓存服务 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.zhilian</groupId>
|
||||||
<artifactId>muyu-common-redis</artifactId>
|
<artifactId>zhilian-common-redis</artifactId>
|
||||||
<version>${muyu.version}</version>
|
<version>${zhilian.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 系统级别 插件 -->
|
<!-- 系统级别 插件 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.zhilian</groupId>
|
||||||
<artifactId>muyu-common-system</artifactId>
|
<artifactId>zhilian-common-system</artifactId>
|
||||||
<version>${muyu.version}</version>
|
<version>${zhilian.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>muyu-auth</module>
|
<module>zhilian-auth</module>
|
||||||
<module>muyu-gateway</module>
|
<module>zhilian-gateway</module>
|
||||||
<module>muyu-visual</module>
|
<module>zhilian-visual</module>
|
||||||
<module>muyu-modules</module>
|
<module>zhilian-modules</module>
|
||||||
<module>muyu-common</module>
|
<module>zhilian-common</module>
|
||||||
</modules>
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
@ -231,12 +232,19 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>${maven-compiler-plugin.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>${java.version}</source>
|
<source>${java.version}</source>
|
||||||
<target>${java.version}</target>
|
<target>${java.version}</target>
|
||||||
<encoding>${project.build.sourceEncoding}</encoding>
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>2.8.2</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
@ -277,7 +285,7 @@
|
||||||
<repository>
|
<repository>
|
||||||
<id>releases</id>
|
<id>releases</id>
|
||||||
<name>releases</name>
|
<name>releases</name>
|
||||||
<url>http://nexus.muyu.com:8081/repository/maven-releases/</url>
|
<url>http://nexus.zhilian.com:8081/repository/maven-releases/</url>
|
||||||
</repository>
|
</repository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
|
||||||
|
@ -285,7 +293,7 @@
|
||||||
<repository>
|
<repository>
|
||||||
<id>public</id>
|
<id>public</id>
|
||||||
<name>aliyun nexus</name>
|
<name>aliyun nexus</name>
|
||||||
<url>http://nexus.muyu.com:8081/repository/maven-public/</url>
|
<url>http://nexus.zhilian.com:8081/repository/maven-public/</url>
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
|
@ -296,7 +304,7 @@
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<id>public</id>
|
<id>public</id>
|
||||||
<name>aliyun nexus</name>
|
<name>aliyun nexus</name>
|
||||||
<url>http://nexus.muyu.com:8081/repository/maven-public/</url>
|
<url>http://nexus.zhilian.com:8081/repository/maven-public/</url>
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
|
|
|
@ -162,7 +162,7 @@ create table sys_menu (
|
||||||
insert into sys_menu values('1', '系统管理', '0', '1', 'system', null, '', 1, 0, 'M', '0', '0', '', 'system', 'admin', sysdate(), '', null, '系统管理目录');
|
insert into sys_menu values('1', '系统管理', '0', '1', 'system', null, '', 1, 0, 'M', '0', '0', '', 'system', 'admin', sysdate(), '', null, '系统管理目录');
|
||||||
insert into sys_menu values('2', '系统监控', '0', '2', 'monitor', null, '', 1, 0, 'M', '0', '0', '', 'monitor', 'admin', sysdate(), '', null, '系统监控目录');
|
insert into sys_menu values('2', '系统监控', '0', '2', 'monitor', null, '', 1, 0, 'M', '0', '0', '', 'monitor', 'admin', sysdate(), '', null, '系统监控目录');
|
||||||
insert into sys_menu values('3', '系统工具', '0', '3', 'tool', null, '', 1, 0, 'M', '0', '0', '', 'tool', 'admin', sysdate(), '', null, '系统工具目录');
|
insert into sys_menu values('3', '系统工具', '0', '3', 'tool', null, '', 1, 0, 'M', '0', '0', '', 'tool', 'admin', sysdate(), '', null, '系统工具目录');
|
||||||
insert into sys_menu values('4', '若依官网', '0', '4', 'http://muyu.vip', null, '', 0, 0, 'M', '0', '0', '', 'guide', 'admin', sysdate(), '', null, '若依官网地址');
|
insert into sys_menu values('4', '若依官网', '0', '4', 'http://zhilian.vip', null, '', 0, 0, 'M', '0', '0', '', 'guide', 'admin', sysdate(), '', null, '若依官网地址');
|
||||||
-- 二级菜单
|
-- 二级菜单
|
||||||
insert into sys_menu values('100', '用户管理', '1', '1', 'user', 'system/user/index', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 'admin', sysdate(), '', null, '用户管理菜单');
|
insert into sys_menu values('100', '用户管理', '1', '1', 'user', 'system/user/index', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 'admin', sysdate(), '', null, '用户管理菜单');
|
||||||
insert into sys_menu values('101', '角色管理', '1', '2', 'role', 'system/role/index', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', sysdate(), '', null, '角色管理菜单');
|
insert into sys_menu values('101', '角色管理', '1', '2', 'role', 'system/role/index', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', sysdate(), '', null, '角色管理菜单');
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
DROP DATABASE IF EXISTS `ry-config`;
|
|
||||||
|
|
||||||
CREATE DATABASE `ry-config` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
|
||||||
|
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
SET NAMES utf8mb4;
|
||||||
SET FOREIGN_KEY_CHECKS = 0;
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
|
||||||
USE `ry-config`;
|
|
||||||
|
|
||||||
/******************************************/
|
/******************************************/
|
||||||
/* 表名称 = config_info */
|
/* 表名称 = config_info */
|
||||||
/******************************************/
|
/******************************************/
|
||||||
|
@ -34,14 +32,14 @@ CREATE TABLE `config_info` (
|
||||||
|
|
||||||
insert into config_info(id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) values
|
insert into config_info(id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) values
|
||||||
(1,'application-dev.yml','DEFAULT_GROUP','spring:\n autoconfigure:\n exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n mvc:\n pathmatch:\n matching-strategy: ant_path_matcher\n\n# feign 配置\nfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n response:\n enabled: true\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n','aaa73b809cfd4d0058893aa13da57806','2020-05-20 12:00:00','2022-04-24 10:26:34','nacos','0:0:0:0:0:0:0:1','','','通用配置','null','null','yaml',NULL,''),
|
(1,'application-dev.yml','DEFAULT_GROUP','spring:\n autoconfigure:\n exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n mvc:\n pathmatch:\n matching-strategy: ant_path_matcher\n\n# feign 配置\nfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n response:\n enabled: true\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n','aaa73b809cfd4d0058893aa13da57806','2020-05-20 12:00:00','2022-04-24 10:26:34','nacos','0:0:0:0:0:0:0:1','','','通用配置','null','null','yaml',NULL,''),
|
||||||
(2,'muyu-gateway-dev.yml','DEFAULT_GROUP','spring:\n redis:\n host: localhost\n port: 6379\n password:\n cloud:\n gateway:\n discovery:\n locator:\n lowerCaseServiceId: true\n enabled: true\n routes:\n # 认证中心\n - id: muyu-auth\n uri: lb://muyu-auth\n predicates:\n - Path=/auth/**\n filters:\n # 验证码处理\n - CacheRequestFilter\n - ValidateCodeFilter\n - StripPrefix=1\n # 代码生成\n - id: muyu-gen\n uri: lb://muyu-gen\n predicates:\n - Path=/code/**\n filters:\n - StripPrefix=1\n # 定时任务\n - id: muyu-job\n uri: lb://muyu-job\n predicates:\n - Path=/schedule/**\n filters:\n - StripPrefix=1\n # 系统模块\n - id: muyu-system\n uri: lb://muyu-system\n predicates:\n - Path=/system/**\n filters:\n - StripPrefix=1\n # 文件服务\n - id: muyu-file\n uri: lb://muyu-file\n predicates:\n - Path=/file/**\n filters:\n - StripPrefix=1\n\n# 安全配置\nsecurity:\n # 验证码\n captcha:\n enabled: true\n type: math\n # 防止XSS攻击\n xss:\n enabled: true\n excludeUrls:\n - /system/notice\n # 不校验白名单\n ignore:\n whites:\n - /auth/logout\n - /auth/login\n - /auth/register\n - /*/v2/api-docs\n - /csrf\n','57cec5abd0e0a6b77d853750344a9dc0','2020-05-14 14:17:55','2022-09-29 02:48:32','nacos','0:0:0:0:0:0:0:1','','','网关模块','null','null','yaml','',''),
|
(2,'zhilian-gateway-dev.yml','DEFAULT_GROUP','spring:\n redis:\n host: localhost\n port: 6379\n password:\n cloud:\n gateway:\n discovery:\n locator:\n lowerCaseServiceId: true\n enabled: true\n routes:\n # 认证中心\n - id: zhilian-auth\n uri: lb://zhilian-auth\n predicates:\n - Path=/auth/**\n filters:\n # 验证码处理\n - CacheRequestFilter\n - ValidateCodeFilter\n - StripPrefix=1\n # 代码生成\n - id: zhilian-gen\n uri: lb://zhilian-gen\n predicates:\n - Path=/code/**\n filters:\n - StripPrefix=1\n # 定时任务\n - id: zhilian-job\n uri: lb://zhilian-job\n predicates:\n - Path=/schedule/**\n filters:\n - StripPrefix=1\n # 系统模块\n - id: zhilian-system\n uri: lb://zhilian-system\n predicates:\n - Path=/system/**\n filters:\n - StripPrefix=1\n # 文件服务\n - id: zhilian-file\n uri: lb://zhilian-file\n predicates:\n - Path=/file/**\n filters:\n - StripPrefix=1\n\n# 安全配置\nsecurity:\n # 验证码\n captcha:\n enabled: true\n type: math\n # 防止XSS攻击\n xss:\n enabled: true\n excludeUrls:\n - /system/notice\n # 不校验白名单\n ignore:\n whites:\n - /auth/logout\n - /auth/login\n - /auth/register\n - /*/v2/api-docs\n - /csrf\n','57cec5abd0e0a6b77d853750344a9dc0','2020-05-14 14:17:55','2022-09-29 02:48:32','nacos','0:0:0:0:0:0:0:1','','','网关模块','null','null','yaml','',''),
|
||||||
(3,'muyu-auth-dev.yml','DEFAULT_GROUP','spring:\n redis:\n host: localhost\n port: 6379\n password:\n','8bd9dada9a94822feeab40de55efced6','2020-11-20 00:00:00','2022-09-29 02:48:42','nacos','0:0:0:0:0:0:0:1','','','认证中心','null','null','yaml','',''),
|
(3,'zhilian-auth-dev.yml','DEFAULT_GROUP','spring:\n redis:\n host: localhost\n port: 6379\n password:\n','8bd9dada9a94822feeab40de55efced6','2020-11-20 00:00:00','2022-09-29 02:48:42','nacos','0:0:0:0:0:0:0:1','','','认证中心','null','null','yaml','',''),
|
||||||
(4,'muyu-monitor-dev.yml','DEFAULT_GROUP','# spring\nspring:\n security:\n user:\n name: muyu\n password: 123456\n boot:\n admin:\n ui:\n title: 若依服务状态监控\n','6f122fd2bfb8d45f858e7d6529a9cd44','2020-11-20 00:00:00','2022-09-29 02:48:54','nacos','0:0:0:0:0:0:0:1','','','监控中心','null','null','yaml','',''),
|
(4,'zhilian-monitor-dev.yml','DEFAULT_GROUP','# spring\nspring:\n security:\n user:\n name: zhilian\n password: 123456\n boot:\n admin:\n ui:\n title: 若依服务状态监控\n','6f122fd2bfb8d45f858e7d6529a9cd44','2020-11-20 00:00:00','2022-09-29 02:48:54','nacos','0:0:0:0:0:0:0:1','','','监控中心','null','null','yaml','',''),
|
||||||
(5,'muyu-system-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: root\n # 从库数据源\n # slave:\n # username: \n # password: \n # url: \n # driver-class-name: \n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.muyu.system\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 系统模块接口文档\n license: Powered By muyu\n licenseUrl: https://muyu.vip','48e0ed4a040c402bdc2444213a82c910','2020-11-20 00:00:00','2022-09-29 02:49:09','nacos','0:0:0:0:0:0:0:1','','','系统模块','null','null','yaml','',''),
|
(5,'zhilian-system-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: root\n # 从库数据源\n # slave:\n # username: \n # password: \n # url: \n # driver-class-name: \n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.zhilian.system\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 系统模块接口文档\n license: Powered By zhilian\n licenseUrl: https://zhilian.vip','48e0ed4a040c402bdc2444213a82c910','2020-11-20 00:00:00','2022-09-29 02:49:09','nacos','0:0:0:0:0:0:0:1','','','系统模块','null','null','yaml','',''),
|
||||||
(6,'muyu-gen-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password:\n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: root\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.muyu.gen.domain\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 代码生成接口文档\n license: Powered By muyu\n licenseUrl: https://muyu.vip\n\n# 代码生成\ngen:\n # 作者\n author: muyu\n # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool\n packageName: com.muyu.system\n # 自动去除表前缀,默认是false\n autoRemovePre: false\n # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)\n tablePrefix: sys_\n','eb592420b3fceae1402881887b8a6a0d','2020-11-20 00:00:00','2022-09-29 02:49:42','nacos','0:0:0:0:0:0:0:1','','','代码生成','null','null','yaml','',''),
|
(6,'zhilian-gen-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password:\n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/zl-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: root\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.zhilian.gen.domain\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 代码生成接口文档\n license: Powered By zhilian\n licenseUrl: https://zhilian.vip\n\n# 代码生成\ngen:\n # 作者\n author: zhilian\n # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool\n packageName: com.zhilian.system\n # 自动去除表前缀,默认是false\n autoRemovePre: false\n # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)\n tablePrefix: sys_\n','eb592420b3fceae1402881887b8a6a0d','2020-11-20 00:00:00','2022-09-29 02:49:42','nacos','0:0:0:0:0:0:0:1','','','代码生成','null','null','yaml','',''),
|
||||||
(7,'muyu-job-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password: \n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: root\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.muyu.job.domain\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 定时任务接口文档\n license: Powered By muyu\n licenseUrl: https://muyu.vip\n','edcf0e3fe13fea07b4ec08b1088f30b3','2020-11-20 00:00:00','2022-09-29 02:50:50','nacos','0:0:0:0:0:0:0:1','','','定时任务','null','null','yaml','',''),
|
(7,'zhilian-job-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password: \n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/zl-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: root\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.zhilian.job.domain\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 定时任务接口文档\n license: Powered By zhilian\n licenseUrl: https://zhilian.vip\n','edcf0e3fe13fea07b4ec08b1088f30b3','2020-11-20 00:00:00','2022-09-29 02:50:50','nacos','0:0:0:0:0:0:0:1','','','定时任务','null','null','yaml','',''),
|
||||||
(8,'muyu-file-dev.yml','DEFAULT_GROUP','# 本地文件上传 \r\nfile:\r\n domain: http://127.0.0.1:9300\r\n path: D:/muyu/uploadPath\r\n prefix: /statics\r\n\r\n# FastDFS配置\r\nfdfs:\r\n domain: http://8.129.231.12\r\n soTimeout: 3000\r\n connectTimeout: 2000\r\n trackerList: 8.129.231.12:22122\r\n\r\n# Minio配置\r\nminio:\r\n url: http://8.129.231.12:9000\r\n accessKey: minioadmin\r\n secretKey: minioadmin\r\n bucketName: test','5382b93f3d8059d6068c0501fdd41195','2020-11-20 00:00:00','2020-12-21 21:01:59',NULL,'0:0:0:0:0:0:0:1','','','文件服务','null','null','yaml',NULL,''),
|
(8,'zhilian-file-dev.yml','DEFAULT_GROUP','# 本地文件上传 \r\nfile:\r\n domain: http://127.0.0.1:9300\r\n path: D:/zhilian/uploadPath\r\n prefix: /statics\r\n\r\n# FastDFS配置\r\nfdfs:\r\n domain: http://8.129.231.12\r\n soTimeout: 3000\r\n connectTimeout: 2000\r\n trackerList: 8.129.231.12:22122\r\n\r\n# Minio配置\r\nminio:\r\n url: http://8.129.231.12:9000\r\n accessKey: minioadmin\r\n secretKey: minioadmin\r\n bucketName: test','5382b93f3d8059d6068c0501fdd41195','2020-11-20 00:00:00','2020-12-21 21:01:59',NULL,'0:0:0:0:0:0:0:1','','','文件服务','null','null','yaml',NULL,''),
|
||||||
(9,'sentinel-muyu-gateway','DEFAULT_GROUP','[\r\n {\r\n \"resource\": \"muyu-auth\",\r\n \"count\": 500,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"muyu-system\",\r\n \"count\": 1000,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"muyu-gen\",\r\n \"count\": 200,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"muyu-job\",\r\n \"count\": 300,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n }\r\n]','9f3a3069261598f74220bc47958ec252','2020-11-20 00:00:00','2020-11-20 00:00:00',NULL,'0:0:0:0:0:0:0:1','','','限流策略','null','null','json',NULL,'');
|
(9,'sentinel-zhilian-gateway','DEFAULT_GROUP','[\r\n {\r\n \"resource\": \"zhilian-auth\",\r\n \"count\": 500,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"zhilian-system\",\r\n \"count\": 1000,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"zhilian-gen\",\r\n \"count\": 200,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"zhilian-job\",\r\n \"count\": 300,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n }\r\n]','9f3a3069261598f74220bc47958ec252','2020-11-20 00:00:00','2020-11-20 00:00:00',NULL,'0:0:0:0:0:0:0:1','','','限流策略','null','null','json',NULL,'');
|
||||||
|
|
||||||
|
|
||||||
/******************************************/
|
/******************************************/
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
DROP DATABASE IF EXISTS `ry-seata`;
|
DROP DATABASE IF EXISTS `zl-seata`;
|
||||||
|
|
||||||
CREATE DATABASE `ry-seata` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
CREATE DATABASE `zl-seata` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
SET NAMES utf8mb4;
|
||||||
SET FOREIGN_KEY_CHECKS = 0;
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
|
||||||
USE `ry-seata`;
|
USE `zl-seata`;
|
||||||
|
|
||||||
-- -------------------------------- The script used when storeMode is 'db' --------------------------------
|
-- -------------------------------- The script used when storeMode is 'db' --------------------------------
|
||||||
-- the table to store GlobalSession data
|
-- the table to store GlobalSession data
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.zhilian</groupId>
|
||||||
<artifactId>smart-cloud-server</artifactId>
|
<artifactId>smart-cloud-server</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>muyu-auth</artifactId>
|
<artifactId>zhilian-auth</artifactId>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
muyu-auth认证授权中心
|
zhilian-auth认证授权中心
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -46,10 +46,10 @@
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- MuYu Common Security-->
|
<!-- zhilian Common Security-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.zhilian</groupId>
|
||||||
<artifactId>muyu-common-security</artifactId>
|
<artifactId>zhilian-common-security</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
|
@ -1,6 +1,6 @@
|
||||||
package com.muyu.auth;
|
package com.zhilian.auth;
|
||||||
|
|
||||||
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
import com.zhilian.common.security.annotation.EnableMyFeignClients;
|
||||||
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.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
|
@ -8,12 +8,12 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
/**
|
/**
|
||||||
* 认证授权中心
|
* 认证授权中心
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
@EnableMyFeignClients
|
@EnableMyFeignClients
|
||||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
||||||
public class MuYuAuthApplication {
|
public class ZhiLianAuthApplication {
|
||||||
public static void main (String[] args) {
|
public static void main (String[] args) {
|
||||||
SpringApplication.run(MuYuAuthApplication.class, args);
|
SpringApplication.run(ZhiLianAuthApplication.class, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,15 +1,15 @@
|
||||||
package com.muyu.auth.controller;
|
package com.zhilian.auth.controller;
|
||||||
|
|
||||||
import com.muyu.auth.form.LoginBody;
|
import com.zhilian.auth.form.LoginBody;
|
||||||
import com.muyu.auth.form.RegisterBody;
|
import com.zhilian.auth.form.RegisterBody;
|
||||||
import com.muyu.auth.service.SysLoginService;
|
import com.zhilian.auth.service.SysLoginService;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.zhilian.common.core.domain.Result;
|
||||||
import com.muyu.common.core.utils.JwtUtils;
|
import com.zhilian.common.core.utils.JwtUtils;
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.zhilian.common.core.utils.StringUtils;
|
||||||
import com.muyu.common.security.auth.AuthUtil;
|
import com.zhilian.common.security.auth.AuthUtil;
|
||||||
import com.muyu.common.security.service.TokenService;
|
import com.zhilian.common.security.service.TokenService;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.zhilian.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.common.system.domain.LoginUser;
|
import com.zhilian.common.system.domain.LoginUser;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
@ -21,7 +21,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
/**
|
/**
|
||||||
* token 控制
|
* token 控制
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
public class TokenController {
|
public class TokenController {
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.auth.form;
|
package com.zhilian.auth.form;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户登录对象
|
* 用户登录对象
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class LoginBody {
|
public class LoginBody {
|
||||||
/**
|
/**
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.auth.form;
|
package com.zhilian.auth.form;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户注册对象
|
* 用户注册对象
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class RegisterBody extends LoginBody {
|
public class RegisterBody extends LoginBody {
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
package com.muyu.auth.service;
|
package com.zhilian.auth.service;
|
||||||
|
|
||||||
import com.muyu.common.core.constant.CacheConstants;
|
import com.zhilian.common.core.constant.CacheConstants;
|
||||||
import com.muyu.common.core.constant.Constants;
|
import com.zhilian.common.core.constant.Constants;
|
||||||
import com.muyu.common.core.constant.SecurityConstants;
|
import com.zhilian.common.core.constant.SecurityConstants;
|
||||||
import com.muyu.common.core.constant.UserConstants;
|
import com.zhilian.common.core.constant.UserConstants;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.zhilian.common.core.domain.Result;
|
||||||
import com.muyu.common.core.enums.UserStatus;
|
import com.zhilian.common.core.enums.UserStatus;
|
||||||
import com.muyu.common.core.exception.ServiceException;
|
import com.zhilian.common.core.exception.ServiceException;
|
||||||
import com.muyu.common.core.text.Convert;
|
import com.zhilian.common.core.text.Convert;
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.zhilian.common.core.utils.StringUtils;
|
||||||
import com.muyu.common.core.utils.ip.IpUtils;
|
import com.zhilian.common.core.utils.ip.IpUtils;
|
||||||
import com.muyu.common.redis.service.RedisService;
|
import com.zhilian.common.redis.service.RedisService;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.zhilian.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.common.system.remote.RemoteUserService;
|
import com.zhilian.common.system.remote.RemoteUserService;
|
||||||
import com.muyu.common.system.domain.SysUser;
|
import com.zhilian.common.system.domain.SysUser;
|
||||||
import com.muyu.common.system.domain.LoginUser;
|
import com.zhilian.common.system.domain.LoginUser;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录校验方法
|
* 登录校验方法
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class SysLoginService {
|
public class SysLoginService {
|
|
@ -1,11 +1,11 @@
|
||||||
package com.muyu.auth.service;
|
package com.zhilian.auth.service;
|
||||||
|
|
||||||
import com.muyu.common.core.constant.CacheConstants;
|
import com.zhilian.common.core.constant.CacheConstants;
|
||||||
import com.muyu.common.core.constant.Constants;
|
import com.zhilian.common.core.constant.Constants;
|
||||||
import com.muyu.common.core.exception.ServiceException;
|
import com.zhilian.common.core.exception.ServiceException;
|
||||||
import com.muyu.common.redis.service.RedisService;
|
import com.zhilian.common.redis.service.RedisService;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.zhilian.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.common.system.domain.SysUser;
|
import com.zhilian.common.system.domain.SysUser;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
/**
|
/**
|
||||||
* 登录密码方法
|
* 登录密码方法
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class SysPasswordService {
|
public class SysPasswordService {
|
|
@ -1,18 +1,18 @@
|
||||||
package com.muyu.auth.service;
|
package com.zhilian.auth.service;
|
||||||
|
|
||||||
import com.muyu.common.core.constant.Constants;
|
import com.zhilian.common.core.constant.Constants;
|
||||||
import com.muyu.common.core.constant.SecurityConstants;
|
import com.zhilian.common.core.constant.SecurityConstants;
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.zhilian.common.core.utils.StringUtils;
|
||||||
import com.muyu.common.core.utils.ip.IpUtils;
|
import com.zhilian.common.core.utils.ip.IpUtils;
|
||||||
import com.muyu.common.system.remote.RemoteLogService;
|
import com.zhilian.common.system.remote.RemoteLogService;
|
||||||
import com.muyu.common.system.domain.SysLogininfor;
|
import com.zhilian.common.system.domain.SysLogininfor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 记录日志方法
|
* 记录日志方法
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class SysRecordLogService {
|
public class SysRecordLogService {
|
|
@ -6,7 +6,7 @@ server:
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: muyu-auth
|
name: zhilian-auth
|
||||||
profiles:
|
profiles:
|
||||||
# 环境配置
|
# 环境配置
|
||||||
active: dev
|
active: dev
|
||||||
|
@ -14,10 +14,10 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 10.10.25.2:8848
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 10.10.25.2:8848
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
<!-- 日志存放路径 -->
|
<!-- 日志存放路径 -->
|
||||||
<property name="log.path" value="logs/muyu-auth"/>
|
<property name="log.path" value="logs/zhilian-auth"/>
|
||||||
<!-- 日志输出格式 -->
|
<!-- 日志输出格式 -->
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<!-- 系统模块日志级别控制 -->
|
<!-- 系统模块日志级别控制 -->
|
||||||
<logger name="com.muyu" level="info"/>
|
<logger name="com.zhilian" level="info"/>
|
||||||
<!-- Spring日志级别控制 -->
|
<!-- Spring日志级别控制 -->
|
||||||
<logger name="org.springframework" level="warn"/>
|
<logger name="org.springframework" level="warn"/>
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<groupId>com.zhilian</groupId>
|
||||||
|
<artifactId>smart-cloud-server</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>zhilian-common-log</module>
|
||||||
|
<module>zhilian-common-core</module>
|
||||||
|
<module>zhilian-common-redis</module>
|
||||||
|
<module>zhilian-common-seata</module>
|
||||||
|
<module>zhilian-common-swagger</module>
|
||||||
|
<module>zhilian-common-security</module>
|
||||||
|
<module>zhilian-common-datascope</module>
|
||||||
|
<module>zhilian-common-datasource</module>
|
||||||
|
<module>zhilian-common-system</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<artifactId>zhilian-common</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
zhilian-common通用模块
|
||||||
|
</description>
|
||||||
|
|
||||||
|
</project>
|
|
@ -3,16 +3,16 @@
|
||||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.zhilian</groupId>
|
||||||
<artifactId>muyu-common</artifactId>
|
<artifactId>zhilian-common</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>muyu-common-core</artifactId>
|
<artifactId>zhilian-common-core</artifactId>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
muyu-common-core核心模块
|
zhilian-common-core核心模块
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
|
@ -1,6 +1,6 @@
|
||||||
package com.muyu.common.core.annotation;
|
package com.zhilian.common.core.annotation;
|
||||||
|
|
||||||
import com.muyu.common.core.utils.poi.ExcelHandlerAdapter;
|
import com.zhilian.common.core.utils.poi.ExcelHandlerAdapter;
|
||||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ import java.math.BigDecimal;
|
||||||
/**
|
/**
|
||||||
* 自定义导出Excel数据注解
|
* 自定义导出Excel数据注解
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target(ElementType.FIELD)
|
@Target(ElementType.FIELD)
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.common.core.annotation;
|
package com.zhilian.common.core.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
|
@ -8,7 +8,7 @@ import java.lang.annotation.Target;
|
||||||
/**
|
/**
|
||||||
* Excel注解集
|
* Excel注解集
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
@Target(ElementType.FIELD)
|
@Target(ElementType.FIELD)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.constant;
|
package com.zhilian.common.core.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缓存常量信息
|
* 缓存常量信息
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class CacheConstants {
|
public class CacheConstants {
|
||||||
/**
|
/**
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.constant;
|
package com.zhilian.common.core.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用常量信息
|
* 通用常量信息
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class Constants {
|
public class Constants {
|
||||||
/**
|
/**
|
||||||
|
@ -119,16 +119,16 @@ public class Constants {
|
||||||
/**
|
/**
|
||||||
* 自动识别json对象白名单配置(仅允许解析的包名,范围越小越安全)
|
* 自动识别json对象白名单配置(仅允许解析的包名,范围越小越安全)
|
||||||
*/
|
*/
|
||||||
public static final String[] JSON_WHITELIST_STR = {"org.springframework", "com.muyu"};
|
public static final String[] JSON_WHITELIST_STR = {"org.springframework", "com.zhilian"};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
|
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
|
||||||
*/
|
*/
|
||||||
public static final String[] JOB_WHITELIST_STR = {"com.muyu"};
|
public static final String[] JOB_WHITELIST_STR = {"com.zhilian"};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时任务违规的字符
|
* 定时任务违规的字符
|
||||||
*/
|
*/
|
||||||
public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
|
public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
|
||||||
"org.springframework", "org.apache", "com.muyu.common.core.utils.file"};
|
"org.springframework", "org.apache", "com.zhilian.common.core.utils.file"};
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.constant;
|
package com.zhilian.common.core.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码生成通用常量
|
* 代码生成通用常量
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class GenConstants {
|
public class GenConstants {
|
||||||
/**
|
/**
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.constant;
|
package com.zhilian.common.core.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回状态码
|
* 返回状态码
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class HttpStatus {
|
public class HttpStatus {
|
||||||
/**
|
/**
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.constant;
|
package com.zhilian.common.core.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务调度通用常量
|
* 任务调度通用常量
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class ScheduleConstants {
|
public class ScheduleConstants {
|
||||||
public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
|
public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.constant;
|
package com.zhilian.common.core.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限相关通用常量
|
* 权限相关通用常量
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class SecurityConstants {
|
public class SecurityConstants {
|
||||||
/**
|
/**
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.zhilian.common.core.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务名称
|
||||||
|
*
|
||||||
|
* @author zhilian
|
||||||
|
*/
|
||||||
|
public class ServiceNameConstants {
|
||||||
|
/**
|
||||||
|
* 认证服务的serviceid
|
||||||
|
*/
|
||||||
|
public static final String AUTH_SERVICE = "zhilian-auth";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统模块的serviceid
|
||||||
|
*/
|
||||||
|
public static final String SYSTEM_SERVICE = "zhilian-system";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件服务的serviceid
|
||||||
|
*/
|
||||||
|
public static final String FILE_SERVICE = "zhilian-file";
|
||||||
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.constant;
|
package com.zhilian.common.core.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Token的Key常量
|
* Token的Key常量
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class TokenConstants {
|
public class TokenConstants {
|
||||||
/**
|
/**
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.constant;
|
package com.zhilian.common.core.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户常量信息
|
* 用户常量信息
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class UserConstants {
|
public class UserConstants {
|
||||||
/**
|
/**
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.context;
|
package com.zhilian.common.core.context;
|
||||||
|
|
||||||
import com.alibaba.ttl.TransmittableThreadLocal;
|
import com.alibaba.ttl.TransmittableThreadLocal;
|
||||||
import com.muyu.common.core.constant.SecurityConstants;
|
import com.zhilian.common.core.constant.SecurityConstants;
|
||||||
import com.muyu.common.core.text.Convert;
|
import com.zhilian.common.core.text.Convert;
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.zhilian.common.core.utils.StringUtils;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
@ -12,7 +12,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||||
* 获取当前线程变量中的 用户id、用户名称、Token等信息
|
* 获取当前线程变量中的 用户id、用户名称、Token等信息
|
||||||
* 注意: 必须在网关通过请求头的方法传入,同时在HeaderInterceptor拦截器设置值。 否则这里无法获取
|
* 注意: 必须在网关通过请求头的方法传入,同时在HeaderInterceptor拦截器设置值。 否则这里无法获取
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class SecurityContextHolder {
|
public class SecurityContextHolder {
|
||||||
private static final TransmittableThreadLocal<Map<String, Object>> THREAD_LOCAL = new TransmittableThreadLocal<>();
|
private static final TransmittableThreadLocal<Map<String, Object>> THREAD_LOCAL = new TransmittableThreadLocal<>();
|
|
@ -1,7 +1,7 @@
|
||||||
package com.muyu.common.core.domain;
|
package com.zhilian.common.core.domain;
|
||||||
|
|
||||||
import com.muyu.common.core.constant.Constants;
|
import com.zhilian.common.core.constant.Constants;
|
||||||
import com.muyu.common.core.constant.HttpStatus;
|
import com.zhilian.common.core.constant.HttpStatus;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -12,7 +12,7 @@ import java.io.Serializable;
|
||||||
/**
|
/**
|
||||||
* 响应信息主体
|
* 响应信息主体
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.enums;
|
package com.zhilian.common.core.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户状态
|
* 用户状态
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public enum UserStatus {
|
public enum UserStatus {
|
||||||
OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除");
|
OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除");
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception;
|
package com.zhilian.common.core.exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证码错误异常类
|
* 验证码错误异常类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class CaptchaException extends RuntimeException {
|
public class CaptchaException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception;
|
package com.zhilian.common.core.exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查异常
|
* 检查异常
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class CheckedException extends RuntimeException {
|
public class CheckedException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception;
|
package com.zhilian.common.core.exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 演示模式异常
|
* 演示模式异常
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class DemoModeException extends RuntimeException {
|
public class DemoModeException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception;
|
package com.zhilian.common.core.exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全局异常
|
* 全局异常
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class GlobalException extends RuntimeException {
|
public class GlobalException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception;
|
package com.zhilian.common.core.exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 内部认证异常
|
* 内部认证异常
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class InnerAuthException extends RuntimeException {
|
public class InnerAuthException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception;
|
package com.zhilian.common.core.exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限异常
|
* 权限异常
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class PreAuthorizeException extends RuntimeException {
|
public class PreAuthorizeException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception;
|
package com.zhilian.common.core.exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 业务异常
|
* 业务异常
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public final class ServiceException extends RuntimeException {
|
public final class ServiceException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception;
|
package com.zhilian.common.core.exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工具类异常
|
* 工具类异常
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class UtilException extends RuntimeException {
|
public class UtilException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 8247610319171014183L;
|
private static final long serialVersionUID = 8247610319171014183L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception.auth;
|
package com.zhilian.common.core.exception.auth;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 未能通过的登录认证异常
|
* 未能通过的登录认证异常
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class NotLoginException extends RuntimeException {
|
public class NotLoginException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,11 +1,11 @@
|
||||||
package com.muyu.common.core.exception.auth;
|
package com.zhilian.common.core.exception.auth;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 未能通过的权限认证异常
|
* 未能通过的权限认证异常
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class NotPermissionException extends RuntimeException {
|
public class NotPermissionException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,11 +1,11 @@
|
||||||
package com.muyu.common.core.exception.auth;
|
package com.zhilian.common.core.exception.auth;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 未能通过的角色认证异常
|
* 未能通过的角色认证异常
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class NotRoleException extends RuntimeException {
|
public class NotRoleException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception.base;
|
package com.zhilian.common.core.exception.base;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基础异常
|
* 基础异常
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class BaseException extends RuntimeException {
|
public class BaseException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,11 +1,11 @@
|
||||||
package com.muyu.common.core.exception.file;
|
package com.zhilian.common.core.exception.file;
|
||||||
|
|
||||||
import com.muyu.common.core.exception.base.BaseException;
|
import com.zhilian.common.core.exception.base.BaseException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件信息异常类
|
* 文件信息异常类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class FileException extends BaseException {
|
public class FileException extends BaseException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception.file;
|
package com.zhilian.common.core.exception.file;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件名称超长限制异常类
|
* 文件名称超长限制异常类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class FileNameLengthLimitExceededException extends FileException {
|
public class FileNameLengthLimitExceededException extends FileException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception.file;
|
package com.zhilian.common.core.exception.file;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件名大小限制异常类
|
* 文件名大小限制异常类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class FileSizeLimitExceededException extends FileException {
|
public class FileSizeLimitExceededException extends FileException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.common.core.exception.file;
|
package com.zhilian.common.core.exception.file;
|
||||||
|
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
@ -6,7 +6,7 @@ import java.io.PrintWriter;
|
||||||
/**
|
/**
|
||||||
* 文件上传异常类
|
* 文件上传异常类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class FileUploadException extends Exception {
|
public class FileUploadException extends Exception {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package com.muyu.common.core.exception.file;
|
package com.zhilian.common.core.exception.file;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件上传 误异常类
|
* 文件上传 误异常类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class InvalidExtensionException extends FileUploadException {
|
public class InvalidExtensionException extends FileUploadException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception.job;
|
package com.zhilian.common.core.exception.job;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计划策略异常
|
* 计划策略异常
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class TaskException extends Exception {
|
public class TaskException extends Exception {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception.user;
|
package com.zhilian.common.core.exception.user;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证码失效异常类
|
* 验证码失效异常类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class CaptchaExpireException extends UserException {
|
public class CaptchaExpireException extends UserException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,11 +1,11 @@
|
||||||
package com.muyu.common.core.exception.user;
|
package com.zhilian.common.core.exception.user;
|
||||||
|
|
||||||
import com.muyu.common.core.exception.base.BaseException;
|
import com.zhilian.common.core.exception.base.BaseException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户信息异常类
|
* 用户信息异常类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class UserException extends BaseException {
|
public class UserException extends BaseException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.exception.user;
|
package com.zhilian.common.core.exception.user;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户密码不正确或不符合规范异常类
|
* 用户密码不正确或不符合规范异常类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class UserPasswordNotMatchException extends UserException {
|
public class UserPasswordNotMatchException extends UserException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
|
@ -1,6 +1,6 @@
|
||||||
package com.muyu.common.core.text;
|
package com.zhilian.common.core.text;
|
||||||
|
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.zhilian.common.core.utils.StringUtils;
|
||||||
|
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
@ -8,7 +8,7 @@ import java.nio.charset.StandardCharsets;
|
||||||
/**
|
/**
|
||||||
* 字符集工具类
|
* 字符集工具类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class CharsetKit {
|
public class CharsetKit {
|
||||||
/**
|
/**
|
|
@ -1,6 +1,6 @@
|
||||||
package com.muyu.common.core.text;
|
package com.zhilian.common.core.text;
|
||||||
|
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.zhilian.common.core.utils.StringUtils;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
@ -13,7 +13,7 @@ import java.util.Set;
|
||||||
/**
|
/**
|
||||||
* 类型转换器
|
* 类型转换器
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class Convert {
|
public class Convert {
|
||||||
/**
|
/**
|
|
@ -1,11 +1,11 @@
|
||||||
package com.muyu.common.core.text;
|
package com.zhilian.common.core.text;
|
||||||
|
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.zhilian.common.core.utils.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字符串格式化
|
* 字符串格式化
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class StrFormatter {
|
public class StrFormatter {
|
||||||
public static final String EMPTY_JSON = "{}";
|
public static final String EMPTY_JSON = "{}";
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.common.core.utils;
|
package com.zhilian.common.core.utils;
|
||||||
|
|
||||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import java.util.Date;
|
||||||
/**
|
/**
|
||||||
* 时间工具类
|
* 时间工具类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||||
public static String YYYY = "yyyy";
|
public static String YYYY = "yyyy";
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.common.core.utils;
|
package com.zhilian.common.core.utils;
|
||||||
|
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import java.io.StringWriter;
|
||||||
/**
|
/**
|
||||||
* 错误信息处理类。
|
* 错误信息处理类。
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class ExceptionUtil {
|
public class ExceptionUtil {
|
||||||
/**
|
/**
|
|
@ -1,8 +1,8 @@
|
||||||
package com.muyu.common.core.utils;
|
package com.zhilian.common.core.utils;
|
||||||
|
|
||||||
import com.muyu.common.core.constant.SecurityConstants;
|
import com.zhilian.common.core.constant.SecurityConstants;
|
||||||
import com.muyu.common.core.constant.TokenConstants;
|
import com.zhilian.common.core.constant.TokenConstants;
|
||||||
import com.muyu.common.core.text.Convert;
|
import com.zhilian.common.core.text.Convert;
|
||||||
import io.jsonwebtoken.Claims;
|
import io.jsonwebtoken.Claims;
|
||||||
import io.jsonwebtoken.Jwts;
|
import io.jsonwebtoken.Jwts;
|
||||||
import io.jsonwebtoken.SignatureAlgorithm;
|
import io.jsonwebtoken.SignatureAlgorithm;
|
||||||
|
@ -12,7 +12,7 @@ import java.util.Map;
|
||||||
/**
|
/**
|
||||||
* Jwt工具类
|
* Jwt工具类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class JwtUtils {
|
public class JwtUtils {
|
||||||
public static String secret = TokenConstants.SECRET;
|
public static String secret = TokenConstants.SECRET;
|
|
@ -1,14 +1,14 @@
|
||||||
package com.muyu.common.core.utils;
|
package com.zhilian.common.core.utils;
|
||||||
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.muyu.common.core.utils.sql.SqlUtil;
|
import com.zhilian.common.core.utils.sql.SqlUtil;
|
||||||
import com.muyu.common.core.web.page.PageDomain;
|
import com.zhilian.common.core.web.page.PageDomain;
|
||||||
import com.muyu.common.core.web.page.TableSupport;
|
import com.zhilian.common.core.web.page.TableSupport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页工具类
|
* 分页工具类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class PageUtils extends PageHelper {
|
public class PageUtils extends PageHelper {
|
||||||
/**
|
/**
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.common.core.utils;
|
package com.zhilian.common.core.utils;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.muyu.common.core.constant.Constants;
|
import com.zhilian.common.core.constant.Constants;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.zhilian.common.core.domain.Result;
|
||||||
import com.muyu.common.core.text.Convert;
|
import com.zhilian.common.core.text.Convert;
|
||||||
import org.springframework.core.io.buffer.DataBuffer;
|
import org.springframework.core.io.buffer.DataBuffer;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
@ -31,7 +31,7 @@ import java.util.Map;
|
||||||
/**
|
/**
|
||||||
* 客户端工具类
|
* 客户端工具类
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
public class ServletUtils {
|
public class ServletUtils {
|
||||||
/**
|
/**
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.common.core.utils;
|
package com.zhilian.common.core.utils;
|
||||||
|
|
||||||
import org.springframework.aop.framework.AopContext;
|
import org.springframework.aop.framework.AopContext;
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
|
@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
|
||||||
/**
|
/**
|
||||||
* spring工具类 方便在非spring管理环境中获取bean
|
* spring工具类 方便在非spring管理环境中获取bean
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author zhilian
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public final class SpringUtils implements BeanFactoryPostProcessor {
|
public final class SpringUtils implements BeanFactoryPostProcessor {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue