parent
c775c8ecb6
commit
f643eeeade
42
README.md
42
README.md
|
@ -1,26 +1,26 @@
|
|||
## 系统模块
|
||||
|
||||
~~~
|
||||
com.muyu
|
||||
├── muyu-ui // 前端框架 [80]
|
||||
├── muyu-gateway // 网关模块 [8080]
|
||||
├── muyu-auth // 认证中心 [9200]
|
||||
├── muyu-common // 通用模块
|
||||
│ └── muyu-common-core // 核心模块
|
||||
│ └── muyu-common-datascope // 权限范围
|
||||
│ └── muyu-common-datasource // 多数据源
|
||||
│ └── muyu-common-log // 日志记录
|
||||
│ └── muyu-common-redis // 缓存服务
|
||||
│ └── muyu-common-seata // 分布式事务
|
||||
│ └── muyu-common-security // 安全模块
|
||||
│ └── muyu-common-swagger // 系统接口
|
||||
│ └── muyu-common-system // 系统基础
|
||||
├── muyu-modules // 业务模块
|
||||
│ └── muyu-system // 系统模块 [9201]
|
||||
│ └── muyu-gen // 代码生成 [9202]
|
||||
│ └── muyu-job // 定时任务 [9203]
|
||||
│ └── muyu-file // 文件服务 [9300]
|
||||
├── muyu-visual // 图形化管理模块
|
||||
│ └── muyu-visual-monitor // 监控中心 [9100]
|
||||
com.zhilian
|
||||
├── zhilian-ui // 前端框架 [80]
|
||||
├── zhilian-gateway // 网关模块 [8080]
|
||||
├── zhilian-auth // 认证中心 [9200]
|
||||
├── zhilian-common // 通用模块
|
||||
│ └── zhilian-common-core // 核心模块
|
||||
│ └── zhilian-common-datascope // 权限范围
|
||||
│ └── zhilian-common-datasource // 多数据源
|
||||
│ └── zhilian-common-log // 日志记录
|
||||
│ └── zhilian-common-redis // 缓存服务
|
||||
│ └── zhilian-common-seata // 分布式事务
|
||||
│ └── zhilian-common-security // 安全模块
|
||||
│ └── zhilian-common-swagger // 系统接口
|
||||
│ └── zhilian-common-system // 系统基础
|
||||
├── zhilian-modules // 业务模块
|
||||
│ └── zhilian-system // 系统模块 [9201]
|
||||
│ └── zhilian-gen // 代码生成 [9202]
|
||||
│ └── zhilian-job // 定时任务 [9203]
|
||||
│ └── zhilian-file // 文件服务 [9300]
|
||||
├── zhilian-visual // 图形化管理模块
|
||||
│ └── zhilian-visual-monitor // 监控中心 [9100]
|
||||
├──pom.xml // 公共依赖
|
||||
~~~
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Auth<74><68><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../muyu-auth/target
|
||||
cd ../zhilian-auth/target
|
||||
|
||||
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
|
||||
pause
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Gateway<61><79><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../muyu-gateway/target
|
||||
cd ../zhilian-gateway/target
|
||||
|
||||
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
|
||||
pause
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-File<6C><65><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
pause
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-Gen<65><6E><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
pause
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-Job<6F><62><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
pause
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-System<65><6D><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
pause
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Monitor<6F><72><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
pause
|
||||
|
|
|
@ -14,28 +14,28 @@ cp ../sql/ry_config_20220929.sql ./mysql/db
|
|||
|
||||
# copy html
|
||||
echo "begin copy html "
|
||||
cp -r ../muyu-ui/dist/** ./nginx/html/dist
|
||||
cp -r ../zhilian-ui/dist/** ./nginx/html/dist
|
||||
|
||||
|
||||
# copy jar
|
||||
echo "begin copy muyu-gateway "
|
||||
cp ../muyu-gateway/target/muyu-gateway.jar ./muyu/gateway/jar
|
||||
echo "begin copy zhilian-gateway "
|
||||
cp ../zhilian-gateway/target/zhilian-gateway.jar ./zhilian/gateway/jar
|
||||
|
||||
echo "begin copy muyu-auth "
|
||||
cp ../muyu-auth/target/muyu-auth.jar ./muyu/auth/jar
|
||||
echo "begin copy zhilian-auth "
|
||||
cp ../zhilian-auth/target/zhilian-auth.jar ./zhilian/auth/jar
|
||||
|
||||
echo "begin copy muyu-visual "
|
||||
cp ../muyu-visual/muyu-monitor/target/muyu-visual-monitor.jar ./muyu/visual/monitor/jar
|
||||
echo "begin copy zhilian-visual "
|
||||
cp ../zhilian-visual/zhilian-monitor/target/zhilian-visual-monitor.jar ./zhilian/visual/monitor/jar
|
||||
|
||||
echo "begin copy muyu-modules-system "
|
||||
cp ../muyu-modules/muyu-system/target/muyu-modules-system.jar ./muyu/modules/system/jar
|
||||
echo "begin copy zhilian-modules-system "
|
||||
cp ../zhilian-modules/zhilian-system/target/zhilian-modules-system.jar ./zhilian/modules/system/jar
|
||||
|
||||
echo "begin copy muyu-modules-file "
|
||||
cp ../muyu-modules/muyu-file/target/muyu-modules-file.jar ./muyu/modules/file/jar
|
||||
echo "begin copy zhilian-modules-file "
|
||||
cp ../zhilian-modules/zhilian-file/target/zhilian-modules-file.jar ./zhilian/modules/file/jar
|
||||
|
||||
echo "begin copy muyu-modules-job "
|
||||
cp ../muyu-modules/muyu-job/target/muyu-modules-job.jar ./muyu/modules/job/jar
|
||||
echo "begin copy zhilian-modules-job "
|
||||
cp ../zhilian-modules/zhilian-job/target/zhilian-modules-job.jar ./zhilian/modules/job/jar
|
||||
|
||||
echo "begin copy muyu-modules-gen "
|
||||
cp ../muyu-modules/muyu-gen/target/muyu-modules-gen.jar ./muyu/modules/gen/jar
|
||||
echo "begin copy zhilian-modules-gen "
|
||||
cp ../zhilian-modules/zhilian-gen/target/zhilian-modules-gen.jar ./zhilian/modules/gen/jar
|
||||
|
||||
|
|
|
@ -26,12 +26,12 @@ port(){
|
|||
|
||||
# 启动基础环境(必须)
|
||||
base(){
|
||||
docker-compose up -d muyu-mysql muyu-redis muyu-nacos
|
||||
docker-compose up -d zhilian-mysql zhilian-redis zhilian-nacos
|
||||
}
|
||||
|
||||
# 启动程序模块(必须)
|
||||
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'
|
||||
services:
|
||||
muyu-nacos:
|
||||
container_name: muyu-nacos
|
||||
zhilian-nacos:
|
||||
container_name: zhilian-nacos
|
||||
image: nacos/nacos-server
|
||||
build:
|
||||
context: ./nacos
|
||||
|
@ -15,9 +15,9 @@ services:
|
|||
- "9848:9848"
|
||||
- "9849:9849"
|
||||
depends_on:
|
||||
- muyu-mysql
|
||||
muyu-mysql:
|
||||
container_name: muyu-mysql
|
||||
- zhilian-mysql
|
||||
zhilian-mysql:
|
||||
container_name: zhilian-mysql
|
||||
image: mysql:5.7
|
||||
build:
|
||||
context: ./mysql
|
||||
|
@ -38,103 +38,103 @@ services:
|
|||
environment:
|
||||
MYSQL_DATABASE: 'ry-cloud'
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
muyu-redis:
|
||||
container_name: muyu-redis
|
||||
zhilian-redis:
|
||||
container_name: zhilian-redis
|
||||
image: redis
|
||||
build:
|
||||
context: ./redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- ./redis/conf/redis.conf:/home/muyu/redis/redis.conf
|
||||
- ./redis/conf/redis.conf:/home/zhilian/redis/redis.conf
|
||||
- ./redis/data:/data
|
||||
command: redis-server /home/muyu/redis/redis.conf
|
||||
muyu-nginx:
|
||||
container_name: muyu-nginx
|
||||
command: redis-server /home/zhilian/redis/redis.conf
|
||||
zhilian-nginx:
|
||||
container_name: zhilian-nginx
|
||||
image: nginx
|
||||
build:
|
||||
context: ./nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
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/logs:/var/log/nginx
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||
depends_on:
|
||||
- muyu-gateway
|
||||
- zhilian-gateway
|
||||
links:
|
||||
- muyu-gateway
|
||||
muyu-gateway:
|
||||
container_name: muyu-gateway
|
||||
- zhilian-gateway
|
||||
zhilian-gateway:
|
||||
container_name: zhilian-gateway
|
||||
build:
|
||||
context: ./muyu/gateway
|
||||
context: ./zhilian/gateway
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
- muyu-redis
|
||||
- zhilian-redis
|
||||
links:
|
||||
- muyu-redis
|
||||
muyu-auth:
|
||||
container_name: muyu-auth
|
||||
- zhilian-redis
|
||||
zhilian-auth:
|
||||
container_name: zhilian-auth
|
||||
build:
|
||||
context: ./muyu/auth
|
||||
context: ./zhilian/auth
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9200:9200"
|
||||
depends_on:
|
||||
- muyu-redis
|
||||
- zhilian-redis
|
||||
links:
|
||||
- muyu-redis
|
||||
muyu-modules-system:
|
||||
container_name: muyu-modules-system
|
||||
- zhilian-redis
|
||||
zhilian-modules-system:
|
||||
container_name: zhilian-modules-system
|
||||
build:
|
||||
context: ./muyu/modules/system
|
||||
context: ./zhilian/modules/system
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9201:9201"
|
||||
depends_on:
|
||||
- muyu-redis
|
||||
- muyu-mysql
|
||||
- zhilian-redis
|
||||
- zhilian-mysql
|
||||
links:
|
||||
- muyu-redis
|
||||
- muyu-mysql
|
||||
muyu-modules-gen:
|
||||
container_name: muyu-modules-gen
|
||||
- zhilian-redis
|
||||
- zhilian-mysql
|
||||
zhilian-modules-gen:
|
||||
container_name: zhilian-modules-gen
|
||||
build:
|
||||
context: ./muyu/modules/gen
|
||||
context: ./zhilian/modules/gen
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9202:9202"
|
||||
depends_on:
|
||||
- muyu-mysql
|
||||
- zhilian-mysql
|
||||
links:
|
||||
- muyu-mysql
|
||||
muyu-modules-job:
|
||||
container_name: muyu-modules-job
|
||||
- zhilian-mysql
|
||||
zhilian-modules-job:
|
||||
container_name: zhilian-modules-job
|
||||
build:
|
||||
context: ./muyu/modules/job
|
||||
context: ./zhilian/modules/job
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9203:9203"
|
||||
depends_on:
|
||||
- muyu-mysql
|
||||
- zhilian-mysql
|
||||
links:
|
||||
- muyu-mysql
|
||||
muyu-modules-file:
|
||||
container_name: muyu-modules-file
|
||||
- zhilian-mysql
|
||||
zhilian-modules-file:
|
||||
container_name: zhilian-modules-file
|
||||
build:
|
||||
context: ./muyu/modules/file
|
||||
context: ./zhilian/modules/file
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9300:9300"
|
||||
volumes:
|
||||
- ./muyu/uploadPath:/home/muyu/uploadPath
|
||||
muyu-visual-monitor:
|
||||
container_name: muyu-visual-monitor
|
||||
- ./zhilian/uploadPath:/home/zhilian/uploadPath
|
||||
zhilian-visual-monitor:
|
||||
container_name: zhilian-visual-monitor
|
||||
build:
|
||||
context: ./muyu/visual/monitor
|
||||
context: ./zhilian/visual/monitor
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9100:9100"
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# 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文件到路径
|
||||
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
|
||||
# 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文件到路径
|
||||
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
|
||||
# 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文件到路径
|
||||
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
|
||||
# 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文件到路径
|
||||
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
|
||||
# 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文件到路径
|
||||
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
|
||||
# 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文件到路径
|
||||
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
|
||||
# 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文件到路径
|
||||
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
|
||||
# author
|
||||
MAINTAINER muyu
|
||||
MAINTAINER zhilian
|
||||
|
||||
# 执行sql脚本
|
||||
ADD ./db/*.sql /docker-entrypoint-initdb.d/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
spring.datasource.platform=mysql
|
||||
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.password=password
|
||||
|
||||
|
@ -16,7 +16,7 @@ management.metrics.export.influx.enabled=false
|
|||
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.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/**
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# 基础镜像
|
||||
FROM nacos/nacos-server
|
||||
# author
|
||||
MAINTAINER muyu
|
||||
MAINTAINER zhilian
|
||||
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/application.properties /home/nacos/conf/application.properties
|
||||
|
|
|
@ -15,7 +15,7 @@ http {
|
|||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /home/muyu/projects/muyu-ui;
|
||||
root /home/zhilian/projects/zhilian-ui;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ http {
|
|||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://muyu-gateway:8080/;
|
||||
proxy_pass http://zhilian-gateway:8080/;
|
||||
}
|
||||
|
||||
# 避免actuator暴露
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# 基础镜像
|
||||
FROM nginx
|
||||
# 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文件到路径
|
||||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||
# 复制html文件到路径
|
||||
COPY ./html/dist /home/muyu/projects/muyu-ui
|
||||
COPY ./html/dist /home/zhilian/projects/zhilian-ui
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
# 基础镜像
|
||||
FROM redis
|
||||
# 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文件到路径
|
||||
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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.muyu</groupId>
|
||||
<groupId>com.zhilian</groupId>
|
||||
<artifactId>smart-cloud-server</artifactId>
|
||||
<version>3.6.3</version>
|
||||
|
||||
<name>muyu</name>
|
||||
<name>zhilian</name>
|
||||
|
||||
<description>微服务系统</description>
|
||||
|
||||
<properties>
|
||||
<muyu.version>3.6.3</muyu.version>
|
||||
<zhilian.version>3.6.3</zhilian.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>17</java.version>
|
||||
|
@ -35,6 +35,7 @@
|
|||
<minio.version>8.2.2</minio.version>
|
||||
<poi.version>4.1.2</poi.version>
|
||||
<transmittable-thread-local.version>2.14.3</transmittable-thread-local.version>
|
||||
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖声明 -->
|
||||
|
@ -145,76 +146,76 @@
|
|||
|
||||
<!-- 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-core</artifactId>
|
||||
<version>${muyu.version}</version>
|
||||
<groupId>com.zhilian</groupId>
|
||||
<artifactId>zhilian-common-core</artifactId>
|
||||
<version>${zhilian.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 接口模块 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-swagger</artifactId>
|
||||
<version>${muyu.version}</version>
|
||||
<groupId>com.zhilian</groupId>
|
||||
<artifactId>zhilian-common-swagger</artifactId>
|
||||
<version>${zhilian.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 安全模块 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-security</artifactId>
|
||||
<version>${muyu.version}</version>
|
||||
<groupId>com.zhilian</groupId>
|
||||
<artifactId>zhilian-common-security</artifactId>
|
||||
<version>${zhilian.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 权限范围 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-datascope</artifactId>
|
||||
<version>${muyu.version}</version>
|
||||
<groupId>com.zhilian</groupId>
|
||||
<artifactId>zhilian-common-datascope</artifactId>
|
||||
<version>${zhilian.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 多数据源 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-datasource</artifactId>
|
||||
<version>${muyu.version}</version>
|
||||
<groupId>com.zhilian</groupId>
|
||||
<artifactId>zhilian-common-datasource</artifactId>
|
||||
<version>${zhilian.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 分布式事务 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-seata</artifactId>
|
||||
<version>${muyu.version}</version>
|
||||
<groupId>com.zhilian</groupId>
|
||||
<artifactId>zhilian-common-seata</artifactId>
|
||||
<version>${zhilian.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 日志记录 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-log</artifactId>
|
||||
<version>${muyu.version}</version>
|
||||
<groupId>com.zhilian</groupId>
|
||||
<artifactId>zhilian-common-log</artifactId>
|
||||
<version>${zhilian.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 缓存服务 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-redis</artifactId>
|
||||
<version>${muyu.version}</version>
|
||||
<groupId>com.zhilian</groupId>
|
||||
<artifactId>zhilian-common-redis</artifactId>
|
||||
<version>${zhilian.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 系统级别 插件 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-system</artifactId>
|
||||
<version>${muyu.version}</version>
|
||||
<groupId>com.zhilian</groupId>
|
||||
<artifactId>zhilian-common-system</artifactId>
|
||||
<version>${zhilian.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<modules>
|
||||
<module>muyu-auth</module>
|
||||
<module>muyu-gateway</module>
|
||||
<module>muyu-visual</module>
|
||||
<module>muyu-modules</module>
|
||||
<module>muyu-common</module>
|
||||
<module>zhilian-auth</module>
|
||||
<module>zhilian-gateway</module>
|
||||
<module>zhilian-visual</module>
|
||||
<module>zhilian-modules</module>
|
||||
<module>zhilian-common</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
@ -231,12 +232,19 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
|
@ -277,7 +285,7 @@
|
|||
<repository>
|
||||
<id>releases</id>
|
||||
<name>releases</name>
|
||||
<url>http://nexus.muyu.com:8081/repository/maven-releases/</url>
|
||||
<url>http://nexus.zhilian.com:8081/repository/maven-releases/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
|
@ -285,7 +293,7 @@
|
|||
<repository>
|
||||
<id>public</id>
|
||||
<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>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
|
@ -296,7 +304,7 @@
|
|||
<pluginRepository>
|
||||
<id>public</id>
|
||||
<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>
|
||||
<enabled>true</enabled>
|
||||
</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('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('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('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 FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
USE `ry-config`;
|
||||
|
||||
/******************************************/
|
||||
/* 表名称 = 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
|
||||
(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','',''),
|
||||
(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','',''),
|
||||
(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','',''),
|
||||
(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','',''),
|
||||
(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','',''),
|
||||
(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','',''),
|
||||
(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,''),
|
||||
(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,'');
|
||||
(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,'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,'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,'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,'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,'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,'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-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 FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
USE `ry-seata`;
|
||||
USE `zl-seata`;
|
||||
|
||||
-- -------------------------------- The script used when storeMode is 'db' --------------------------------
|
||||
-- the table to store GlobalSession data
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
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>
|
||||
<groupId>com.zhilian</groupId>
|
||||
<artifactId>smart-cloud-server</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>muyu-auth</artifactId>
|
||||
<artifactId>zhilian-auth</artifactId>
|
||||
|
||||
<description>
|
||||
muyu-auth认证授权中心
|
||||
zhilian-auth认证授权中心
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
@ -46,10 +46,10 @@
|
|||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MuYu Common Security-->
|
||||
<!-- zhilian Common Security-->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-security</artifactId>
|
||||
<groupId>com.zhilian</groupId>
|
||||
<artifactId>zhilian-common-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
</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.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
@ -8,12 +8,12 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|||
/**
|
||||
* 认证授权中心
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
@EnableMyFeignClients
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
||||
public class MuYuAuthApplication {
|
||||
public class ZhiLianAuthApplication {
|
||||
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.muyu.auth.form.RegisterBody;
|
||||
import com.muyu.auth.service.SysLoginService;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.JwtUtils;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.common.security.auth.AuthUtil;
|
||||
import com.muyu.common.security.service.TokenService;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.common.system.domain.LoginUser;
|
||||
import com.zhilian.auth.form.LoginBody;
|
||||
import com.zhilian.auth.form.RegisterBody;
|
||||
import com.zhilian.auth.service.SysLoginService;
|
||||
import com.zhilian.common.core.domain.Result;
|
||||
import com.zhilian.common.core.utils.JwtUtils;
|
||||
import com.zhilian.common.core.utils.StringUtils;
|
||||
import com.zhilian.common.security.auth.AuthUtil;
|
||||
import com.zhilian.common.security.service.TokenService;
|
||||
import com.zhilian.common.security.utils.SecurityUtils;
|
||||
import com.zhilian.common.system.domain.LoginUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
@ -21,7 +21,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||
/**
|
||||
* token 控制
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
@RestController
|
||||
public class TokenController {
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.auth.form;
|
||||
package com.zhilian.auth.form;
|
||||
|
||||
/**
|
||||
* 用户登录对象
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
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 {
|
||||
|
|
@ -1,27 +1,27 @@
|
|||
package com.muyu.auth.service;
|
||||
package com.zhilian.auth.service;
|
||||
|
||||
import com.muyu.common.core.constant.CacheConstants;
|
||||
import com.muyu.common.core.constant.Constants;
|
||||
import com.muyu.common.core.constant.SecurityConstants;
|
||||
import com.muyu.common.core.constant.UserConstants;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.enums.UserStatus;
|
||||
import com.muyu.common.core.exception.ServiceException;
|
||||
import com.muyu.common.core.text.Convert;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.common.core.utils.ip.IpUtils;
|
||||
import com.muyu.common.redis.service.RedisService;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.common.system.remote.RemoteUserService;
|
||||
import com.muyu.common.system.domain.SysUser;
|
||||
import com.muyu.common.system.domain.LoginUser;
|
||||
import com.zhilian.common.core.constant.CacheConstants;
|
||||
import com.zhilian.common.core.constant.Constants;
|
||||
import com.zhilian.common.core.constant.SecurityConstants;
|
||||
import com.zhilian.common.core.constant.UserConstants;
|
||||
import com.zhilian.common.core.domain.Result;
|
||||
import com.zhilian.common.core.enums.UserStatus;
|
||||
import com.zhilian.common.core.exception.ServiceException;
|
||||
import com.zhilian.common.core.text.Convert;
|
||||
import com.zhilian.common.core.utils.StringUtils;
|
||||
import com.zhilian.common.core.utils.ip.IpUtils;
|
||||
import com.zhilian.common.redis.service.RedisService;
|
||||
import com.zhilian.common.security.utils.SecurityUtils;
|
||||
import com.zhilian.common.system.remote.RemoteUserService;
|
||||
import com.zhilian.common.system.domain.SysUser;
|
||||
import com.zhilian.common.system.domain.LoginUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 登录校验方法
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
@Component
|
||||
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.muyu.common.core.constant.Constants;
|
||||
import com.muyu.common.core.exception.ServiceException;
|
||||
import com.muyu.common.redis.service.RedisService;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.common.system.domain.SysUser;
|
||||
import com.zhilian.common.core.constant.CacheConstants;
|
||||
import com.zhilian.common.core.constant.Constants;
|
||||
import com.zhilian.common.core.exception.ServiceException;
|
||||
import com.zhilian.common.redis.service.RedisService;
|
||||
import com.zhilian.common.security.utils.SecurityUtils;
|
||||
import com.zhilian.common.system.domain.SysUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import java.util.concurrent.TimeUnit;
|
|||
/**
|
||||
* 登录密码方法
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
@Component
|
||||
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.muyu.common.core.constant.SecurityConstants;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.common.core.utils.ip.IpUtils;
|
||||
import com.muyu.common.system.remote.RemoteLogService;
|
||||
import com.muyu.common.system.domain.SysLogininfor;
|
||||
import com.zhilian.common.core.constant.Constants;
|
||||
import com.zhilian.common.core.constant.SecurityConstants;
|
||||
import com.zhilian.common.core.utils.StringUtils;
|
||||
import com.zhilian.common.core.utils.ip.IpUtils;
|
||||
import com.zhilian.common.system.remote.RemoteLogService;
|
||||
import com.zhilian.common.system.domain.SysLogininfor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 记录日志方法
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
@Component
|
||||
public class SysRecordLogService {
|
|
@ -6,7 +6,7 @@ server:
|
|||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: muyu-auth
|
||||
name: zhilian-auth
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
|
@ -14,10 +14,10 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 10.10.25.2:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 10.10.25.2:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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"/>
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
|||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.muyu" level="info"/>
|
||||
<logger name="com.zhilian" level="info"/>
|
||||
<!-- Spring日志级别控制 -->
|
||||
<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"
|
||||
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>muyu-common</artifactId>
|
||||
<groupId>com.zhilian</groupId>
|
||||
<artifactId>zhilian-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>muyu-common-core</artifactId>
|
||||
<artifactId>zhilian-common-core</artifactId>
|
||||
|
||||
<description>
|
||||
muyu-common-core核心模块
|
||||
zhilian-common-core核心模块
|
||||
</description>
|
||||
|
||||
<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.IndexedColors;
|
||||
|
||||
|
@ -13,7 +13,7 @@ import java.math.BigDecimal;
|
|||
/**
|
||||
* 自定义导出Excel数据注解
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@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.Retention;
|
||||
|
@ -8,7 +8,7 @@ import java.lang.annotation.Target;
|
|||
/**
|
||||
* Excel注解集
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
@Target(ElementType.FIELD)
|
||||
@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 {
|
||||
/**
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.common.core.constant;
|
||||
package com.zhilian.common.core.constant;
|
||||
|
||||
/**
|
||||
* 通用常量信息
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
public class Constants {
|
||||
/**
|
||||
|
@ -119,16 +119,16 @@ public class Constants {
|
|||
/**
|
||||
* 自动识别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",
|
||||
"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 {
|
||||
/**
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.common.core.constant;
|
||||
package com.zhilian.common.core.constant;
|
||||
|
||||
/**
|
||||
* 返回状态码
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
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 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 {
|
||||
/**
|
|
@ -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常量
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
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 {
|
||||
/**
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.common.core.context;
|
||||
package com.zhilian.common.core.context;
|
||||
|
||||
import com.alibaba.ttl.TransmittableThreadLocal;
|
||||
import com.muyu.common.core.constant.SecurityConstants;
|
||||
import com.muyu.common.core.text.Convert;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.zhilian.common.core.constant.SecurityConstants;
|
||||
import com.zhilian.common.core.text.Convert;
|
||||
import com.zhilian.common.core.utils.StringUtils;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
@ -12,7 +12,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
* 获取当前线程变量中的 用户id、用户名称、Token等信息
|
||||
* 注意: 必须在网关通过请求头的方法传入,同时在HeaderInterceptor拦截器设置值。 否则这里无法获取
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
public class SecurityContextHolder {
|
||||
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.muyu.common.core.constant.HttpStatus;
|
||||
import com.zhilian.common.core.constant.Constants;
|
||||
import com.zhilian.common.core.constant.HttpStatus;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
@ -12,7 +12,7 @@ import java.io.Serializable;
|
|||
/**
|
||||
* 响应信息主体
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.common.core.enums;
|
||||
package com.zhilian.common.core.enums;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
public enum UserStatus {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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;
|
||||
|
||||
/**
|
||||
* 未能通过的权限认证异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
public class NotPermissionException extends RuntimeException {
|
||||
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;
|
||||
|
||||
/**
|
||||
* 未能通过的角色认证异常
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
public class NotRoleException extends RuntimeException {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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.PrintWriter;
|
||||
|
@ -6,7 +6,7 @@ import java.io.PrintWriter;
|
|||
/**
|
||||
* 文件上传异常类
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
* 文件上传 误异常类
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
public class InvalidExtensionException extends FileUploadException {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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.StandardCharsets;
|
||||
|
@ -8,7 +8,7 @@ import java.nio.charset.StandardCharsets;
|
|||
/**
|
||||
* 字符集工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
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.BigInteger;
|
||||
|
@ -13,7 +13,7 @@ import java.util.Set;
|
|||
/**
|
||||
* 类型转换器
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
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 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;
|
||||
|
||||
|
@ -11,7 +11,7 @@ import java.util.Date;
|
|||
/**
|
||||
* 时间工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||
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;
|
||||
|
||||
|
@ -8,7 +8,7 @@ import java.io.StringWriter;
|
|||
/**
|
||||
* 错误信息处理类。
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
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.muyu.common.core.constant.TokenConstants;
|
||||
import com.muyu.common.core.text.Convert;
|
||||
import com.zhilian.common.core.constant.SecurityConstants;
|
||||
import com.zhilian.common.core.constant.TokenConstants;
|
||||
import com.zhilian.common.core.text.Convert;
|
||||
import io.jsonwebtoken.Claims;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import io.jsonwebtoken.SignatureAlgorithm;
|
||||
|
@ -12,7 +12,7 @@ import java.util.Map;
|
|||
/**
|
||||
* Jwt工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
public class JwtUtils {
|
||||
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.muyu.common.core.utils.sql.SqlUtil;
|
||||
import com.muyu.common.core.web.page.PageDomain;
|
||||
import com.muyu.common.core.web.page.TableSupport;
|
||||
import com.zhilian.common.core.utils.sql.SqlUtil;
|
||||
import com.zhilian.common.core.web.page.PageDomain;
|
||||
import com.zhilian.common.core.web.page.TableSupport;
|
||||
|
||||
/**
|
||||
* 分页工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
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.muyu.common.core.constant.Constants;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.text.Convert;
|
||||
import com.zhilian.common.core.constant.Constants;
|
||||
import com.zhilian.common.core.domain.Result;
|
||||
import com.zhilian.common.core.text.Convert;
|
||||
import org.springframework.core.io.buffer.DataBuffer;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
@ -31,7 +31,7 @@ import java.util.Map;
|
|||
/**
|
||||
* 客户端工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
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.beans.BeansException;
|
||||
|
@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
|
|||
/**
|
||||
* spring工具类 方便在非spring管理环境中获取bean
|
||||
*
|
||||
* @author muyu
|
||||
* @author zhilian
|
||||
*/
|
||||
@Component
|
||||
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