京源环保MES项目初始版本
commit
0605ded58f
@ -0,0 +1,46 @@
|
||||
######################################################################
|
||||
# Build Tools
|
||||
|
||||
.gradle
|
||||
/build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
######################################################################
|
||||
# IDE
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### JRebel ###
|
||||
rebel.xml
|
||||
### NetBeans ###
|
||||
nbproject/private/
|
||||
build/*
|
||||
nbbuild/
|
||||
dist/
|
||||
nbdist/
|
||||
.nb-gradle/
|
||||
|
||||
######################################################################
|
||||
# Others
|
||||
*.log
|
||||
*.xml.versionsBackup
|
||||
*.swp
|
||||
|
||||
!*/build/*.java
|
||||
!*/build/*.html
|
||||
!*/build/*.xml
|
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 若依
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 清理工程target生成路径。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
call mvn clean
|
||||
|
||||
pause
|
@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Auth工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../hw-auth/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar hw-auth.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Gateway工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../hw-gateway/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar hw-gateway.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Modules-File工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../hw-modules/hw-file/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar hw-modules-file.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Modules-Gen工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../hw-modules/hw-gen/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar hw-modules-gen.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Modules-Job工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../hw-modules/hw-job/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar hw-modules-job.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Modules-System工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../hw-modules/hw-system/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar hw-modules-system.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Monitor工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../hw-visual/hw-monitor/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar hw-visual-monitor.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -0,0 +1,67 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 使用说明,用来提示输入参数
|
||||
usage() {
|
||||
echo "Usage: sh 执行脚本.sh [port|base|modules|stop|rm]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# 开启所需端口
|
||||
port(){
|
||||
firewall-cmd --add-port=80/tcp --permanent
|
||||
firewall-cmd --add-port=8080/tcp --permanent
|
||||
firewall-cmd --add-port=8848/tcp --permanent
|
||||
firewall-cmd --add-port=9848/tcp --permanent
|
||||
firewall-cmd --add-port=9849/tcp --permanent
|
||||
firewall-cmd --add-port=6379/tcp --permanent
|
||||
firewall-cmd --add-port=3306/tcp --permanent
|
||||
firewall-cmd --add-port=9100/tcp --permanent
|
||||
firewall-cmd --add-port=9200/tcp --permanent
|
||||
firewall-cmd --add-port=9201/tcp --permanent
|
||||
firewall-cmd --add-port=9202/tcp --permanent
|
||||
firewall-cmd --add-port=9203/tcp --permanent
|
||||
firewall-cmd --add-port=9300/tcp --permanent
|
||||
service firewalld restart
|
||||
}
|
||||
|
||||
# 启动基础环境(必须)
|
||||
base(){
|
||||
docker-compose up -d hw-mysql hw-redis hw-nacos
|
||||
}
|
||||
|
||||
# 启动程序模块(必须)
|
||||
modules(){
|
||||
docker-compose up -d hw-nginx hw-gateway hw-auth hw-modules-system
|
||||
}
|
||||
|
||||
# 关闭所有环境/模块
|
||||
stop(){
|
||||
docker-compose stop
|
||||
}
|
||||
|
||||
# 删除所有环境/模块
|
||||
rm(){
|
||||
docker-compose rm
|
||||
}
|
||||
|
||||
# 根据输入参数,选择执行对应方法,不输入则执行使用说明
|
||||
case "$1" in
|
||||
"port")
|
||||
port
|
||||
;;
|
||||
"base")
|
||||
base
|
||||
;;
|
||||
"modules")
|
||||
modules
|
||||
;;
|
||||
"stop")
|
||||
stop
|
||||
;;
|
||||
"rm")
|
||||
rm
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
@ -0,0 +1,140 @@
|
||||
version : '3.8'
|
||||
services:
|
||||
hw-nacos:
|
||||
container_name: hw-nacos
|
||||
image: nacos/nacos-server
|
||||
build:
|
||||
context: ./nacos
|
||||
environment:
|
||||
- MODE=standalone
|
||||
volumes:
|
||||
- ./nacos/logs/:/home/nacos/logs
|
||||
- ./nacos/conf/application.properties:/home/nacos/conf/application.properties
|
||||
ports:
|
||||
- "8848:8848"
|
||||
- "9848:9848"
|
||||
- "9849:9849"
|
||||
depends_on:
|
||||
- hw-mysql
|
||||
hw-mysql:
|
||||
container_name: hw-mysql
|
||||
image: mysql:5.7
|
||||
build:
|
||||
context: ./mysql
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- ./mysql/conf:/etc/mysql/conf.d
|
||||
- ./mysql/logs:/logs
|
||||
- ./mysql/data:/var/lib/mysql
|
||||
command: [
|
||||
'mysqld',
|
||||
'--innodb-buffer-pool-size=80M',
|
||||
'--character-set-server=utf8mb4',
|
||||
'--collation-server=utf8mb4_unicode_ci',
|
||||
'--default-time-zone=+8:00',
|
||||
'--lower-case-table-names=1'
|
||||
]
|
||||
environment:
|
||||
MYSQL_DATABASE: 'ry-cloud'
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
hw-redis:
|
||||
container_name: hw-redis
|
||||
image: redis
|
||||
build:
|
||||
context: ./redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- ./redis/conf/redis.conf:/home/hw/redis/redis.conf
|
||||
- ./redis/data:/data
|
||||
command: redis-server /home/hw/redis/redis.conf
|
||||
hw-nginx:
|
||||
container_name: hw-nginx
|
||||
image: nginx
|
||||
build:
|
||||
context: ./nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx/html/dist:/home/hw/projects/hw-ui
|
||||
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./nginx/logs:/var/log/nginx
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||
depends_on:
|
||||
- hw-gateway
|
||||
links:
|
||||
- hw-gateway
|
||||
hw-gateway:
|
||||
container_name: hw-gateway
|
||||
build:
|
||||
context: ./hw/gateway
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
- hw-redis
|
||||
links:
|
||||
- hw-redis
|
||||
hw-auth:
|
||||
container_name: hw-auth
|
||||
build:
|
||||
context: ./hw/auth
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9200:9200"
|
||||
depends_on:
|
||||
- hw-redis
|
||||
links:
|
||||
- hw-redis
|
||||
hw-modules-system:
|
||||
container_name: hw-modules-system
|
||||
build:
|
||||
context: ./hw/modules/system
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9201:9201"
|
||||
depends_on:
|
||||
- hw-redis
|
||||
- hw-mysql
|
||||
links:
|
||||
- hw-redis
|
||||
- hw-mysql
|
||||
hw-modules-gen:
|
||||
container_name: hw-modules-gen
|
||||
build:
|
||||
context: ./hw/modules/gen
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9202:9202"
|
||||
depends_on:
|
||||
- hw-mysql
|
||||
links:
|
||||
- hw-mysql
|
||||
hw-modules-job:
|
||||
container_name: hw-modules-job
|
||||
build:
|
||||
context: ./hw/modules/job
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9203:9203"
|
||||
depends_on:
|
||||
- hw-mysql
|
||||
links:
|
||||
- hw-mysql
|
||||
hw-modules-file:
|
||||
container_name: hw-modules-file
|
||||
build:
|
||||
context: ./hw/modules/file
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9300:9300"
|
||||
volumes:
|
||||
- ./hw/uploadPath:/home/hw/uploadPath
|
||||
hw-visual-monitor:
|
||||
container_name: hw-visual-monitor
|
||||
build:
|
||||
context: ./hw/visual/monitor
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9100:9100"
|
@ -0,0 +1,7 @@
|
||||
# 基础镜像
|
||||
FROM mysql:5.7
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 执行sql脚本
|
||||
ADD ./db/*.sql /docker-entrypoint-initdb.d/
|
@ -0,0 +1,32 @@
|
||||
spring.datasource.platform=mysql
|
||||
db.num=1
|
||||
db.url.0=jdbc:mysql://ruoyi-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||||
db.user=root
|
||||
db.password=password
|
||||
|
||||
nacos.naming.empty-service.auto-clean=true
|
||||
nacos.naming.empty-service.clean.initial-delay-ms=50000
|
||||
nacos.naming.empty-service.clean.period-time-ms=30000
|
||||
|
||||
management.endpoints.web.exposure.include=*
|
||||
|
||||
management.metrics.export.elastic.enabled=false
|
||||
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/ruoyi/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.core.auth.system.type=nacos
|
||||
nacos.core.auth.enabled=false
|
||||
nacos.core.auth.default.token.expire.seconds=18000
|
||||
nacos.core.auth.default.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
|
||||
nacos.core.auth.caching.enabled=true
|
||||
nacos.core.auth.enable.userAgentAuthWhite=false
|
||||
nacos.core.auth.server.identity.key=serverIdentity
|
||||
nacos.core.auth.server.identity.value=security
|
||||
|
||||
nacos.istio.mcp.server.enabled=false
|
@ -0,0 +1,7 @@
|
||||
# 基础镜像
|
||||
FROM nacos/nacos-server
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/application.properties /home/nacos/conf/application.properties
|
@ -0,0 +1,41 @@
|
||||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /home/ruoyi/projects/ruoyi-ui;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /prod-api/{
|
||||
proxy_set_header Host $http_host;
|
||||
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://ruoyi-gateway:8080/;
|
||||
}
|
||||
|
||||
# 避免actuator暴露
|
||||
if ($request_uri ~ "/actuator") {
|
||||
return 403;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM nginx
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi/projects/hw-ui
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi/projects/hw-ui
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi/projects/hw-ui
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||
# 复制html文件到路径
|
||||
COPY ./html/dist /home/ruoyi/projects/hw-ui
|
@ -0,0 +1 @@
|
||||
# requirepass 123456
|
@ -0,0 +1,13 @@
|
||||
# 基础镜像
|
||||
FROM redis
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi/redis
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi/redis
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi/redis
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/redis.conf /home/ruoyi/redis/redis.conf
|
@ -0,0 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/hw-auth.jar /home/ruoyi/hw-auth.jar
|
||||
# 启动认证服务
|
||||
ENTRYPOINT ["java","-jar","hw-auth.jar"]
|
@ -0,0 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/hw-gateway.jar /home/ruoyi/hw-gateway.jar
|
||||
# 启动网关服务
|
||||
ENTRYPOINT ["java","-jar","hw-gateway.jar"]
|
@ -0,0 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/hw-modules-file.jar /home/ruoyi/hw-modules-file.jar
|
||||
# 启动文件服务
|
||||
ENTRYPOINT ["java","-jar","hw-modules-file.jar"]
|
@ -0,0 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/hw-modules-gen.jar /home/ruoyi/hw-modules-gen.jar
|
||||
# 启动代码生成服务
|
||||
ENTRYPOINT ["java","-jar","hw-modules-gen.jar"]
|
@ -0,0 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/hw-modules-job.jar /home/ruoyi/hw-modules-job.jar
|
||||
# 启动定时任务服务
|
||||
ENTRYPOINT ["java","-jar","hw-modules-job.jar"]
|
@ -0,0 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/hw-modules-system.jar /home/ruoyi/hw-modules-system.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","hw-modules-system.jar"]
|
@ -0,0 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/hw-visual-monitor.jar /home/ruoyi/hw-visual-monitor.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","hw-visual-monitor.jar"]
|
@ -0,0 +1,28 @@
|
||||
<?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.hw</groupId>
|
||||
<artifactId>hw-api</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>hw-api-system</artifactId>
|
||||
|
||||
<description>
|
||||
hw-api-system系统接口模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- RuoYi Common Core-->
|
||||
<dependency>
|
||||
<groupId>com.hw</groupId>
|
||||
<artifactId>hw-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,29 @@
|
||||
package com.hw.system.api;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.hw.common.core.constant.ServiceNameConstants;
|
||||
import com.hw.common.core.domain.R;
|
||||
import com.hw.system.api.domain.SysFile;
|
||||
import com.hw.system.api.factory.RemoteFileFallbackFactory;
|
||||
|
||||
/**
|
||||
* 文件服务
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
|
||||
public interface RemoteFileService
|
||||
{
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
* @param file 文件信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file);
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.hw.system.api;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import com.hw.common.core.constant.SecurityConstants;
|
||||
import com.hw.common.core.constant.ServiceNameConstants;
|
||||
import com.hw.common.core.domain.R;
|
||||
import com.hw.system.api.domain.SysLogininfor;
|
||||
import com.hw.system.api.domain.SysOperLog;
|
||||
import com.hw.system.api.factory.RemoteLogFallbackFactory;
|
||||
|
||||
/**
|
||||
* 日志服务
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
|
||||
public interface RemoteLogService
|
||||
{
|
||||
/**
|
||||
* 保存系统日志
|
||||
*
|
||||
* @param sysOperLog 日志实体
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/operlog")
|
||||
public R<Boolean> saveLog(@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception;
|
||||
|
||||
/**
|
||||
* 保存访问记录
|
||||
*
|
||||
* @param sysLogininfor 访问实体
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/logininfor")
|
||||
public R<Boolean> saveLogininfor(@RequestBody SysLogininfor sysLogininfor, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.hw.system.api;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import com.hw.common.core.constant.SecurityConstants;
|
||||
import com.hw.common.core.constant.ServiceNameConstants;
|
||||
import com.hw.common.core.domain.R;
|
||||
import com.hw.system.api.domain.SysUser;
|
||||
import com.hw.system.api.factory.RemoteUserFallbackFactory;
|
||||
import com.hw.system.api.model.LoginUser;
|
||||
|
||||
/**
|
||||
* 用户服务
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
|
||||
public interface RemoteUserService
|
||||
{
|
||||
/**
|
||||
* 通过用户名查询用户信息
|
||||
*
|
||||
* @param username 用户名
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/user/info/{username}")
|
||||
public R<LoginUser> getUserInfo(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* 注册用户信息
|
||||
*
|
||||
* @param sysUser 用户信息
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/user/register")
|
||||
public R<Boolean> registerUserInfo(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.hw.system.api.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 文件信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class SysFile
|
||||
{
|
||||
/**
|
||||
* 文件名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 文件地址
|
||||
*/
|
||||
private String url;
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getUrl()
|
||||
{
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url)
|
||||
{
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("name", getName())
|
||||
.append("url", getUrl())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package com.hw.system.api.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.hw.common.core.annotation.Excel;
|
||||
import com.hw.common.core.annotation.Excel.ColumnType;
|
||||
import com.hw.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 系统访问记录表 sys_logininfor
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class SysLogininfor extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
@Excel(name = "序号", cellType = ColumnType.NUMERIC)
|
||||
private Long infoId;
|
||||
|
||||
/** 用户账号 */
|
||||
@Excel(name = "用户账号")
|
||||
private String userName;
|
||||
|
||||
/** 状态 0成功 1失败 */
|
||||
@Excel(name = "状态", readConverterExp = "0=成功,1=失败")
|
||||
private String status;
|
||||
|
||||
/** 地址 */
|
||||
@Excel(name = "地址")
|
||||
private String ipaddr;
|
||||
|
||||
/** 描述 */
|
||||
@Excel(name = "描述")
|
||||
private String msg;
|
||||
|
||||
/** 访问时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date accessTime;
|
||||
|
||||
public Long getInfoId()
|
||||
{
|
||||
return infoId;
|
||||
}
|
||||
|
||||
public void setInfoId(Long infoId)
|
||||
{
|
||||
this.infoId = infoId;
|
||||
}
|
||||
|
||||
public String getUserName()
|
||||
{
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName)
|
||||
{
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getIpaddr()
|
||||
{
|
||||
return ipaddr;
|
||||
}
|
||||
|
||||
public void setIpaddr(String ipaddr)
|
||||
{
|
||||
this.ipaddr = ipaddr;
|
||||
}
|
||||
|
||||
public String getMsg()
|
||||
{
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg)
|
||||
{
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Date getAccessTime()
|
||||
{
|
||||
return accessTime;
|
||||
}
|
||||
|
||||
public void setAccessTime(Date accessTime)
|
||||
{
|
||||
this.accessTime = accessTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.hw.system.api.factory;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.hw.common.core.domain.R;
|
||||
import com.hw.system.api.RemoteFileService;
|
||||
import com.hw.system.api.domain.SysFile;
|
||||
|
||||
/**
|
||||
* 文件服务降级处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Component
|
||||
public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileService>
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteFileFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteFileService create(Throwable throwable)
|
||||
{
|
||||
log.error("文件服务调用失败:{}", throwable.getMessage());
|
||||
return new RemoteFileService()
|
||||
{
|
||||
@Override
|
||||
public R<SysFile> upload(MultipartFile file)
|
||||
{
|
||||
return R.fail("上传文件失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.hw.system.api.factory;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.hw.common.core.domain.R;
|
||||
import com.hw.system.api.RemoteLogService;
|
||||
import com.hw.system.api.domain.SysLogininfor;
|
||||
import com.hw.system.api.domain.SysOperLog;
|
||||
|
||||
/**
|
||||
* 日志服务降级处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Component
|
||||
public class RemoteLogFallbackFactory implements FallbackFactory<RemoteLogService>
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteLogFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteLogService create(Throwable throwable)
|
||||
{
|
||||
log.error("日志服务调用失败:{}", throwable.getMessage());
|
||||
return new RemoteLogService()
|
||||
{
|
||||
@Override
|
||||
public R<Boolean> saveLog(SysOperLog sysOperLog, String source)
|
||||
{
|
||||
return R.fail("保存操作日志失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Boolean> saveLogininfor(SysLogininfor sysLogininfor, String source)
|
||||
{
|
||||
return R.fail("保存登录日志失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.hw.system.api.factory;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.hw.common.core.domain.R;
|
||||
import com.hw.system.api.RemoteUserService;
|
||||
import com.hw.system.api.domain.SysUser;
|
||||
import com.hw.system.api.model.LoginUser;
|
||||
|
||||
/**
|
||||
* 用户服务降级处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Component
|
||||
public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserService>
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteUserFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteUserService create(Throwable throwable)
|
||||
{
|
||||
log.error("用户服务调用失败:{}", throwable.getMessage());
|
||||
return new RemoteUserService()
|
||||
{
|
||||
@Override
|
||||
public R<LoginUser> getUserInfo(String username, String source)
|
||||
{
|
||||
return R.fail("获取用户失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Boolean> registerUserInfo(SysUser sysUser, String source)
|
||||
{
|
||||
return R.fail("注册用户失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
@ -0,0 +1,150 @@
|
||||
package com.hw.system.api.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
import com.hw.system.api.domain.SysUser;
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class LoginUser implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户唯一标识
|
||||
*/
|
||||
private String token;
|
||||
|
||||
/**
|
||||
* 用户名id
|
||||
*/
|
||||
private Long userid;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 登录时间
|
||||
*/
|
||||
private Long loginTime;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
private Long expireTime;
|
||||
|
||||
/**
|
||||
* 登录IP地址
|
||||
*/
|
||||
private String ipaddr;
|
||||
|
||||
/**
|
||||
* 权限列表
|
||||
*/
|
||||
private Set<String> permissions;
|
||||
|
||||
/**
|
||||
* 角色列表
|
||||
*/
|
||||
private Set<String> roles;
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*/
|
||||
private SysUser sysUser;
|
||||
|
||||
public String getToken()
|
||||
{
|
||||
return token;
|
||||
}
|
||||
|
||||
public void setToken(String token)
|
||||
{
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public Long getUserid()
|
||||
{
|
||||
return userid;
|
||||
}
|
||||
|
||||
public void setUserid(Long userid)
|
||||
{
|
||||
this.userid = userid;
|
||||
}
|
||||
|
||||
public String getUsername()
|
||||
{
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username)
|
||||
{
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public Long getLoginTime()
|
||||
{
|
||||
return loginTime;
|
||||
}
|
||||
|
||||
public void setLoginTime(Long loginTime)
|
||||
{
|
||||
this.loginTime = loginTime;
|
||||
}
|
||||
|
||||
public Long getExpireTime()
|
||||
{
|
||||
return expireTime;
|
||||
}
|
||||
|
||||
public void setExpireTime(Long expireTime)
|
||||
{
|
||||
this.expireTime = expireTime;
|
||||
}
|
||||
|
||||
public String getIpaddr()
|
||||
{
|
||||
return ipaddr;
|
||||
}
|
||||
|
||||
public void setIpaddr(String ipaddr)
|
||||
{
|
||||
this.ipaddr = ipaddr;
|
||||
}
|
||||
|
||||
public Set<String> getPermissions()
|
||||
{
|
||||
return permissions;
|
||||
}
|
||||
|
||||
public void setPermissions(Set<String> permissions)
|
||||
{
|
||||
this.permissions = permissions;
|
||||
}
|
||||
|
||||
public Set<String> getRoles()
|
||||
{
|
||||
return roles;
|
||||
}
|
||||
|
||||
public void setRoles(Set<String> roles)
|
||||
{
|
||||
this.roles = roles;
|
||||
}
|
||||
|
||||
public SysUser getSysUser()
|
||||
{
|
||||
return sysUser;
|
||||
}
|
||||
|
||||
public void setSysUser(SysUser sysUser)
|
||||
{
|
||||
this.sysUser = sysUser;
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
com.hw.system.api.factory.RemoteUserFallbackFactory
|
||||
com.hw.system.api.factory.RemoteLogFallbackFactory
|
||||
com.hw.system.api.factory.RemoteFileFallbackFactory
|
@ -0,0 +1,22 @@
|
||||
<?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.hw</groupId>
|
||||
<artifactId>hw</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<modules>
|
||||
<module>hw-api-system</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>hw-api</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<description>
|
||||
hw-api系统接口
|
||||
</description>
|
||||
|
||||
</project>
|
@ -0,0 +1,74 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.hw</groupId>
|
||||
<artifactId>hw</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>hw-auth</artifactId>
|
||||
|
||||
<description>
|
||||
hw-auth认证授权中心
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Web -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common Security-->
|
||||
<dependency>
|
||||
<groupId>com.hw</groupId>
|
||||
<artifactId>hw-common-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,31 @@
|
||||
package com.hw.auth;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import com.hw.common.security.annotation.EnableRyFeignClients;
|
||||
|
||||
/**
|
||||
* 认证授权中心
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
||||
public class RuoYiAuthApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
SpringApplication.run(RuoYiAuthApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 认证授权中心启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
" | ( ' ) | \\ _. / ' \n" +
|
||||
" |(_ o _) / _( )_ .' \n" +
|
||||
" | (_,_).' __ ___(_ o _)' \n" +
|
||||
" | |\\ \\ | || |(_,_)' \n" +
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
}
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package com.hw.auth.controller;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.hw.auth.form.LoginBody;
|
||||
import com.hw.auth.form.RegisterBody;
|
||||
import com.hw.auth.service.SysLoginService;
|
||||
import com.hw.common.core.domain.R;
|
||||
import com.hw.common.core.utils.JwtUtils;
|
||||
import com.hw.common.core.utils.StringUtils;
|
||||
import com.hw.common.security.auth.AuthUtil;
|
||||
import com.hw.common.security.service.TokenService;
|
||||
import com.hw.common.security.utils.SecurityUtils;
|
||||
import com.hw.system.api.model.LoginUser;
|
||||
|
||||
/**
|
||||
* token 控制
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
public class TokenController
|
||||
{
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
@Autowired
|
||||
private SysLoginService sysLoginService;
|
||||
|
||||
@PostMapping("login")
|
||||
public R<?> login(@RequestBody LoginBody form)
|
||||
{
|
||||
// 用户登录
|
||||
LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
|
||||
// 获取登录token
|
||||
return R.ok(tokenService.createToken(userInfo));
|
||||
}
|
||||
|
||||
@DeleteMapping("logout")
|
||||
public R<?> logout(HttpServletRequest request)
|
||||
{
|
||||
String token = SecurityUtils.getToken(request);
|
||||
if (StringUtils.isNotEmpty(token))
|
||||
{
|
||||
String username = JwtUtils.getUserName(token);
|
||||
// 删除用户缓存记录
|
||||
AuthUtil.logoutByToken(token);
|
||||
// 记录用户退出日志
|
||||
sysLoginService.logout(username);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@PostMapping("refresh")
|
||||
public R<?> refresh(HttpServletRequest request)
|
||||
{
|
||||
LoginUser loginUser = tokenService.getLoginUser(request);
|
||||
if (StringUtils.isNotNull(loginUser))
|
||||
{
|
||||
// 刷新令牌有效期
|
||||
tokenService.refreshToken(loginUser);
|
||||
return R.ok();
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@PostMapping("register")
|
||||
public R<?> register(@RequestBody RegisterBody registerBody)
|
||||
{
|
||||
// 用户注册
|
||||
sysLoginService.register(registerBody.getUsername(), registerBody.getPassword());
|
||||
return R.ok();
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.hw.auth.form;
|
||||
|
||||
/**
|
||||
* 用户登录对象
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class LoginBody
|
||||
{
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 用户密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
public String getUsername()
|
||||
{
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username)
|
||||
{
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword()
|
||||
{
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password)
|
||||
{
|
||||
this.password = password;
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.hw.auth.form;
|
||||
|
||||
/**
|
||||
* 用户注册对象
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class RegisterBody extends LoginBody
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.hw.auth.service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.hw.common.core.constant.Constants;
|
||||
import com.hw.common.core.constant.SecurityConstants;
|
||||
import com.hw.common.core.utils.StringUtils;
|
||||
import com.hw.common.core.utils.ip.IpUtils;
|
||||
import com.hw.system.api.RemoteLogService;
|
||||
import com.hw.system.api.domain.SysLogininfor;
|
||||
|
||||
/**
|
||||
* 记录日志方法
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Component
|
||||
public class SysRecordLogService
|
||||
{
|
||||
@Autowired
|
||||
private RemoteLogService remoteLogService;
|
||||
|
||||
/**
|
||||
* 记录登录信息
|
||||
*
|
||||
* @param username 用户名
|
||||
* @param status 状态
|
||||
* @param message 消息内容
|
||||
* @return
|
||||
*/
|
||||
public void recordLogininfor(String username, String status, String message)
|
||||
{
|
||||
SysLogininfor logininfor = new SysLogininfor();
|
||||
logininfor.setUserName(username);
|
||||
logininfor.setIpaddr(IpUtils.getIpAddr());
|
||||
logininfor.setMsg(message);
|
||||
// 日志状态
|
||||
if (StringUtils.equalsAny(status, Constants.LOGIN_SUCCESS, Constants.LOGOUT, Constants.REGISTER))
|
||||
{
|
||||
logininfor.setStatus(Constants.LOGIN_SUCCESS_STATUS);
|
||||
}
|
||||
else if (Constants.LOGIN_FAIL.equals(status))
|
||||
{
|
||||
logininfor.setStatus(Constants.LOGIN_FAIL_STATUS);
|
||||
}
|
||||
remoteLogService.saveLogininfor(logininfor, SecurityConstants.INNER);
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
||||
_ _ _
|
||||
(_) | | | |
|
||||
_ __ _ _ ___ _ _ _ ______ __ _ _ _ | |_ | |__
|
||||
| '__|| | | | / _ \ | | | || ||______| / _` || | | || __|| '_ \
|
||||
| | | |_| || (_) || |_| || | | (_| || |_| || |_ | | | |
|
||||
|_| \__,_| \___/ \__, ||_| \__,_| \__,_| \__||_| |_|
|
||||
__/ |
|
||||
|___/
|
@ -0,0 +1,29 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 7200
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: hw-auth
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 175.27.215.92:8848
|
||||
namespace: jyhb
|
||||
group: DEFAULT_GROUP
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 175.27.215.92:8848
|
||||
namespace: jyhb
|
||||
group: DEFAULT_GROUP
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/hw-auth" />
|
||||
<!-- 日志输出格式 -->
|
||||
<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.hw" 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>
|
@ -0,0 +1,118 @@
|
||||
<?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.hw</groupId>
|
||||
<artifactId>hw-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>hw-common-core</artifactId>
|
||||
|
||||
<description>
|
||||
hw-common-core核心模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Openfeign -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Loadbalancer -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring Context Support -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring Web -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Transmittable ThreadLocal -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>transmittable-thread-local</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Pagehelper -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Hibernate Validator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Jackson -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Alibaba Fastjson -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Jwt -->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Jaxb -->
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Apache Lang3 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Commons Io -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- excel工具 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Java Servlet -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger -->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,18 @@
|
||||
package com.hw.common.core.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Excel注解集
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Target(ElementType.FIELD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Excels
|
||||
{
|
||||
Excel[] value();
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package com.hw.common.core.constant;
|
||||
|
||||
/**
|
||||
* 代码生成通用常量
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class GenConstants
|
||||
{
|
||||
/** 单表(增删改查) */
|
||||
public static final String TPL_CRUD = "crud";
|
||||
|
||||
/** 树表(增删改查) */
|
||||
public static final String TPL_TREE = "tree";
|
||||
|
||||
/** 主子表(增删改查) */
|
||||
public static final String TPL_SUB = "sub";
|
||||
|
||||
/** 树编码字段 */
|
||||
public static final String TREE_CODE = "treeCode";
|
||||
|
||||
/** 树父编码字段 */
|
||||
public static final String TREE_PARENT_CODE = "treeParentCode";
|
||||
|
||||
/** 树名称字段 */
|
||||
public static final String TREE_NAME = "treeName";
|
||||
|
||||
/** 上级菜单ID字段 */
|
||||
public static final String PARENT_MENU_ID = "parentMenuId";
|
||||
|
||||
/** 上级菜单名称字段 */
|
||||
public static final String PARENT_MENU_NAME = "parentMenuName";
|
||||
|
||||
/** 数据库字符串类型 */
|
||||
public static final String[] COLUMNTYPE_STR = { "char", "varchar", "nvarchar", "varchar2" };
|
||||
|
||||
/** 数据库文本类型 */
|
||||
public static final String[] COLUMNTYPE_TEXT = { "tinytext", "text", "mediumtext", "longtext" };
|
||||
|
||||
/** 数据库时间类型 */
|
||||
public static final String[] COLUMNTYPE_TIME = { "datetime", "time", "date", "timestamp" };
|
||||
|
||||
/** 数据库数字类型 */
|
||||
public static final String[] COLUMNTYPE_NUMBER = { "tinyint", "smallint", "mediumint", "int", "number", "integer",
|
||||
"bigint", "float", "double", "decimal" };
|
||||
|
||||
/** 页面不需要编辑字段 */
|
||||
public static final String[] COLUMNNAME_NOT_EDIT = { "id", "create_by", "create_time", "del_flag" };
|
||||
|
||||
/** 页面不需要显示的列表字段 */
|
||||
public static final String[] COLUMNNAME_NOT_LIST = { "id", "create_by", "create_time", "del_flag", "update_by",
|
||||
"update_time" };
|
||||
|
||||
/** 页面不需要查询字段 */
|
||||
public static final String[] COLUMNNAME_NOT_QUERY = { "id", "create_by", "create_time", "del_flag", "update_by",
|
||||
"update_time", "remark" };
|
||||
|
||||
/** Entity基类字段 */
|
||||
public static final String[] BASE_ENTITY = { "createBy", "createTime", "updateBy", "updateTime", "remark" };
|
||||
|
||||
/** Tree基类字段 */
|
||||
public static final String[] TREE_ENTITY = { "parentName", "parentId", "orderNum", "ancestors" };
|
||||
|
||||
/** 文本框 */
|
||||
public static final String HTML_INPUT = "input";
|
||||
|
||||
/** 文本域 */
|
||||
public static final String HTML_TEXTAREA = "textarea";
|
||||
|
||||
/** 下拉框 */
|
||||
public static final String HTML_SELECT = "select";
|
||||
|
||||
/** 单选框 */
|
||||
public static final String HTML_RADIO = "radio";
|
||||
|
||||
/** 复选框 */
|
||||
public static final String HTML_CHECKBOX = "checkbox";
|
||||
|
||||
/** 日期控件 */
|
||||
public static final String HTML_DATETIME = "datetime";
|
||||
|
||||
/** 图片上传控件 */
|
||||
public static final String HTML_IMAGE_UPLOAD = "imageUpload";
|
||||
|
||||
/** 文件上传控件 */
|
||||
public static final String HTML_FILE_UPLOAD = "fileUpload";
|
||||
|
||||
/** 富文本控件 */
|
||||
public static final String HTML_EDITOR = "editor";
|
||||
|
||||
/** 字符串类型 */
|
||||
public static final String TYPE_STRING = "String";
|
||||
|
||||
/** 整型 */
|
||||
public static final String TYPE_INTEGER = "Integer";
|
||||
|
||||
/** 长整型 */
|
||||
public static final String TYPE_LONG = "Long";
|
||||
|
||||
/** 浮点型 */
|
||||
public static final String TYPE_DOUBLE = "Double";
|
||||
|
||||
/** 高精度计算类型 */
|
||||
public static final String TYPE_BIGDECIMAL = "BigDecimal";
|
||||
|
||||
/** 时间类型 */
|
||||
public static final String TYPE_DATE = "Date";
|
||||
|
||||
/** 模糊查询 */
|
||||
public static final String QUERY_LIKE = "LIKE";
|
||||
|
||||
/** 相等查询 */
|
||||
public static final String QUERY_EQ = "EQ";
|
||||
|
||||
/** 需要 */
|
||||
public static final String REQUIRE = "1";
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.hw.common.core.constant;
|
||||
|
||||
/**
|
||||
* 任务调度通用常量
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class ScheduleConstants
|
||||
{
|
||||
public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
|
||||
|
||||
/** 执行目标key */
|
||||
public static final String TASK_PROPERTIES = "TASK_PROPERTIES";
|
||||
|
||||
/** 默认 */
|
||||
public static final String MISFIRE_DEFAULT = "0";
|
||||
|
||||
/** 立即触发执行 */
|
||||
public static final String MISFIRE_IGNORE_MISFIRES = "1";
|
||||
|
||||
/** 触发一次执行 */
|
||||
public static final String MISFIRE_FIRE_AND_PROCEED = "2";
|
||||
|
||||
/** 不触发立即执行 */
|
||||
public static final String MISFIRE_DO_NOTHING = "3";
|
||||
|
||||
public enum Status
|
||||
{
|
||||
/**
|
||||
* 正常
|
||||
*/
|
||||
NORMAL("0"),
|
||||
/**
|
||||
* 暂停
|
||||
*/
|
||||
PAUSE("1");
|
||||
|
||||
private String value;
|
||||
|
||||
private Status(String value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue()
|
||||
{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.hw.common.core.constant;
|
||||
|
||||
/**
|
||||
* 权限相关通用常量
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class SecurityConstants
|
||||
{
|
||||
/**
|
||||
* 用户ID字段
|
||||
*/
|
||||
public static final String DETAILS_USER_ID = "user_id";
|
||||
|
||||
/**
|
||||
* 用户名字段
|
||||
*/
|
||||
public static final String DETAILS_USERNAME = "username";
|
||||
|
||||
/**
|
||||
* 授权信息字段
|
||||
*/
|
||||
public static final String AUTHORIZATION_HEADER = "authorization";
|
||||
|
||||
/**
|
||||
* 请求来源
|
||||
*/
|
||||
public static final String FROM_SOURCE = "from-source";
|
||||
|
||||
/**
|
||||
* 内部请求
|
||||
*/
|
||||
public static final String INNER = "inner";
|
||||
|
||||
/**
|
||||
* 用户标识
|
||||
*/
|
||||
public static final String USER_KEY = "user_key";
|
||||
|
||||
/**
|
||||
* 登录用户
|
||||
*/
|
||||
public static final String LOGIN_USER = "login_user";
|
||||
|
||||
/**
|
||||
* 角色权限
|
||||
*/
|
||||
public static final String ROLE_PERMISSION = "role_permission";
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.hw.common.core.constant;
|
||||
|
||||
/**
|
||||
* 服务名称
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class ServiceNameConstants
|
||||
{
|
||||
/**
|
||||
* 认证服务的serviceid
|
||||
*/
|
||||
public static final String AUTH_SERVICE = "hw-auth";
|
||||
|
||||
/**
|
||||
* 系统模块的serviceid
|
||||
*/
|
||||
public static final String SYSTEM_SERVICE = "hw-system";
|
||||
|
||||
/**
|
||||
* 文件服务的serviceid
|
||||
*/
|
||||
public static final String FILE_SERVICE = "hw-file";
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.hw.common.core.constant;
|
||||
|
||||
/**
|
||||
* Token的Key常量
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class TokenConstants
|
||||
{
|
||||
/**
|
||||
* 令牌自定义标识
|
||||
*/
|
||||
public static final String AUTHENTICATION = "Authorization";
|
||||
|
||||
/**
|
||||
* 令牌前缀
|
||||
*/
|
||||
public static final String PREFIX = "Bearer ";
|
||||
|
||||
/**
|
||||
* 令牌秘钥
|
||||
*/
|
||||
public final static String SECRET = "abcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package com.hw.common.core.constant;
|
||||
|
||||
/**
|
||||
* 用户常量信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class UserConstants
|
||||
{
|
||||
/**
|
||||
* 平台内系统用户的唯一标志
|
||||
*/
|
||||
public static final String SYS_USER = "SYS_USER";
|
||||
|
||||
/** 正常状态 */
|
||||
public static final String NORMAL = "0";
|
||||
|
||||
/** 异常状态 */
|
||||
public static final String EXCEPTION = "1";
|
||||
|
||||
/** 用户封禁状态 */
|
||||
public static final String USER_DISABLE = "1";
|
||||
|
||||
/** 角色封禁状态 */
|
||||
public static final String ROLE_DISABLE = "1";
|
||||
|
||||
/** 部门正常状态 */
|
||||
public static final String DEPT_NORMAL = "0";
|
||||
|
||||
/** 部门停用状态 */
|
||||
public static final String DEPT_DISABLE = "1";
|
||||
|
||||
/** 字典正常状态 */
|
||||
public static final String DICT_NORMAL = "0";
|
||||
|
||||
/** 是否为系统默认(是) */
|
||||
public static final String YES = "Y";
|
||||
|
||||
/** 是否菜单外链(是) */
|
||||
public static final String YES_FRAME = "0";
|
||||
|
||||
/** 是否菜单外链(否) */
|
||||
public static final String NO_FRAME = "1";
|
||||
|
||||
/** 菜单类型(目录) */
|
||||
public static final String TYPE_DIR = "M";
|
||||
|
||||
/** 菜单类型(菜单) */
|
||||
public static final String TYPE_MENU = "C";
|
||||
|
||||
/** 菜单类型(按钮) */
|
||||
public static final String TYPE_BUTTON = "F";
|
||||
|
||||
/** Layout组件标识 */
|
||||
public final static String LAYOUT = "Layout";
|
||||
|
||||
/** ParentView组件标识 */
|
||||
public final static String PARENT_VIEW = "ParentView";
|
||||
|
||||
/** InnerLink组件标识 */
|
||||
public final static String INNER_LINK = "InnerLink";
|
||||
|
||||
/** 校验是否唯一的返回标识 */
|
||||
public final static boolean UNIQUE = true;
|
||||
public final static boolean NOT_UNIQUE = false;
|
||||
|
||||
/**
|
||||
* 用户名长度限制
|
||||
*/
|
||||
public static final int USERNAME_MIN_LENGTH = 2;
|
||||
|
||||
public static final int USERNAME_MAX_LENGTH = 20;
|
||||
|
||||
/**
|
||||
* 密码长度限制
|
||||
*/
|
||||
public static final int PASSWORD_MIN_LENGTH = 5;
|
||||
|
||||
public static final int PASSWORD_MAX_LENGTH = 20;
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
package com.hw.common.core.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.hw.common.core.constant.Constants;
|
||||
|
||||
/**
|
||||
* 响应信息主体
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class R<T> implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 成功 */
|
||||
public static final int SUCCESS = Constants.SUCCESS;
|
||||
|
||||
/** 失败 */
|
||||
public static final int FAIL = Constants.FAIL;
|
||||
|
||||
private int code;
|
||||
|
||||
private String msg;
|
||||
|
||||
private T data;
|
||||
|
||||
public static <T> R<T> ok()
|
||||
{
|
||||
return restResult(null, SUCCESS, null);
|
||||
}
|
||||
|
||||
public static <T> R<T> ok(T data)
|
||||
{
|
||||
return restResult(data, SUCCESS, null);
|
||||
}
|
||||
|
||||
public static <T> R<T> ok(T data, String msg)
|
||||
{
|
||||
return restResult(data, SUCCESS, msg);
|
||||
}
|
||||
|
||||
public static <T> R<T> fail()
|
||||
{
|
||||
return restResult(null, FAIL, null);
|
||||
}
|
||||
|
||||
public static <T> R<T> fail(String msg)
|
||||
{
|
||||
return restResult(null, FAIL, msg);
|
||||
}
|
||||
|
||||
public static <T> R<T> fail(T data)
|
||||
{
|
||||
return restResult(data, FAIL, null);
|
||||
}
|
||||
|
||||
public static <T> R<T> fail(T data, String msg)
|
||||
{
|
||||
return restResult(data, FAIL, msg);
|
||||
}
|
||||
|
||||
public static <T> R<T> fail(int code, String msg)
|
||||
{
|
||||
return restResult(null, code, msg);
|
||||
}
|
||||
|
||||
private static <T> R<T> restResult(T data, int code, String msg)
|
||||
{
|
||||
R<T> apiResult = new R<>();
|
||||
apiResult.setCode(code);
|
||||
apiResult.setData(data);
|
||||
apiResult.setMsg(msg);
|
||||
return apiResult;
|
||||
}
|
||||
|
||||
public int getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg()
|
||||
{
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg)
|
||||
{
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public T getData()
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(T data)
|
||||
{
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static <T> Boolean isError(R<T> ret)
|
||||
{
|
||||
return !isSuccess(ret);
|
||||
}
|
||||
|
||||
public static <T> Boolean isSuccess(R<T> ret)
|
||||
{
|
||||
return R.SUCCESS == ret.getCode();
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.hw.common.core.enums;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public enum UserStatus
|
||||
{
|
||||
OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
UserStatus(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.hw.common.core.exception;
|
||||
|
||||
/**
|
||||
* 验证码错误异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class CaptchaException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public CaptchaException(String msg)
|
||||
{
|
||||
super(msg);
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.hw.common.core.exception;
|
||||
|
||||
/**
|
||||
* 检查异常
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class CheckedException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public CheckedException(String message)
|
||||
{
|
||||
super(message);
|
||||
}
|
||||
|
||||
public CheckedException(Throwable cause)
|
||||
{
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public CheckedException(String message, Throwable cause)
|
||||
{
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public CheckedException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)
|
||||
{
|
||||
super(message, cause, enableSuppression, writableStackTrace);
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.hw.common.core.exception;
|
||||
|
||||
/**
|
||||
* 演示模式异常
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class DemoModeException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public DemoModeException()
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.hw.common.core.exception;
|
||||
|
||||
/**
|
||||
* 内部认证异常
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class InnerAuthException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public InnerAuthException(String message)
|
||||
{
|
||||
super(message);
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.hw.common.core.exception;
|
||||
|
||||
/**
|
||||
* 权限异常
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class PreAuthorizeException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public PreAuthorizeException()
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.hw.common.core.exception;
|
||||
|
||||
/**
|
||||
* 工具类异常
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class UtilException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 8247610319171014183L;
|
||||
|
||||
public UtilException(Throwable e)
|
||||
{
|
||||
super(e.getMessage(), e);
|
||||
}
|
||||
|
||||
public UtilException(String message)
|
||||
{
|
||||
super(message);
|
||||
}
|
||||
|
||||
public UtilException(String message, Throwable throwable)
|
||||
{
|
||||
super(message, throwable);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.hw.common.core.exception.auth;
|
||||
|
||||
/**
|
||||
* 未能通过的登录认证异常
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class NotLoginException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public NotLoginException(String message)
|
||||
{
|
||||
super(message);
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.hw.common.core.exception.auth;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* 未能通过的权限认证异常
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class NotPermissionException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public NotPermissionException(String permission)
|
||||
{
|
||||
super(permission);
|
||||
}
|
||||
|
||||
public NotPermissionException(String[] permissions)
|
||||
{
|
||||
super(StringUtils.join(permissions, ","));
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.hw.common.core.exception.auth;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* 未能通过的角色认证异常
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class NotRoleException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public NotRoleException(String role)
|
||||
{
|
||||
super(role);
|
||||
}
|
||||
|
||||
public NotRoleException(String[] roles)
|
||||
{
|
||||
super(StringUtils.join(roles, ","));
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.hw.common.core.exception.base;
|
||||
|
||||
/**
|
||||
* 基础异常
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class BaseException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 所属模块
|
||||
*/
|
||||
private String module;
|
||||
|
||||
/**
|
||||
* 错误码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 错误码对应的参数
|
||||
*/
|
||||
private Object[] args;
|
||||
|
||||
/**
|
||||
* 错误消息
|
||||
*/
|
||||
private String defaultMessage;
|
||||
|
||||
public BaseException(String module, String code, Object[] args, String defaultMessage)
|
||||
{
|
||||
this.module = module;
|
||||
this.code = code;
|
||||
this.args = args;
|
||||
this.defaultMessage = defaultMessage;
|
||||
}
|
||||
|
||||
public BaseException(String module, String code, Object[] args)
|
||||
{
|
||||
this(module, code, args, null);
|
||||
}
|
||||
|
||||
public BaseException(String module, String defaultMessage)
|
||||
{
|
||||
this(module, null, null, defaultMessage);
|
||||
}
|
||||
|
||||
public BaseException(String code, Object[] args)
|
||||
{
|
||||
this(null, code, args, null);
|
||||
}
|
||||
|
||||
public BaseException(String defaultMessage)
|
||||
{
|
||||
this(null, null, null, defaultMessage);
|
||||
}
|
||||
|
||||
public String getModule()
|
||||
{
|
||||
return module;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public Object[] getArgs()
|
||||
{
|
||||
return args;
|
||||
}
|
||||
|
||||
public String getDefaultMessage()
|
||||
{
|
||||
return defaultMessage;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.hw.common.core.exception.file;
|
||||
|
||||
import com.hw.common.core.exception.base.BaseException;
|
||||
|
||||
/**
|
||||
* 文件信息异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class FileException extends BaseException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public FileException(String code, Object[] args, String msg)
|
||||
{
|
||||
super("file", code, args, msg);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.hw.common.core.exception.file;
|
||||
|
||||
/**
|
||||
* 文件名称超长限制异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class FileNameLengthLimitExceededException extends FileException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public FileNameLengthLimitExceededException(int defaultFileNameLength)
|
||||
{
|
||||
super("upload.filename.exceed.length", new Object[] { defaultFileNameLength }, "the filename is too long");
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.hw.common.core.exception.file;
|
||||
|
||||
/**
|
||||
* 文件名大小限制异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class FileSizeLimitExceededException extends FileException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public FileSizeLimitExceededException(long defaultMaxSize)
|
||||
{
|
||||
super("upload.exceed.maxSize", new Object[] { defaultMaxSize }, "the filesize is too large");
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.common.core.exception.file;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
* 文件上传异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class FileUploadException extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final Throwable cause;
|
||||
|
||||
public FileUploadException()
|
||||
{
|
||||
this(null, null);
|
||||
}
|
||||
|
||||
public FileUploadException(final String msg)
|
||||
{
|
||||
this(msg, null);
|
||||
}
|
||||
|
||||
public FileUploadException(String msg, Throwable cause)
|
||||
{
|
||||
super(msg);
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printStackTrace(PrintStream stream)
|
||||
{
|
||||
super.printStackTrace(stream);
|
||||
if (cause != null)
|
||||
{
|
||||
stream.println("Caused by:");
|
||||
cause.printStackTrace(stream);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printStackTrace(PrintWriter writer)
|
||||
{
|
||||
super.printStackTrace(writer);
|
||||
if (cause != null)
|
||||
{
|
||||
writer.println("Caused by:");
|
||||
cause.printStackTrace(writer);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Throwable getCause()
|
||||
{
|
||||
return cause;
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package com.hw.common.core.exception.file;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 文件上传 误异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class InvalidExtensionException extends FileUploadException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String[] allowedExtension;
|
||||
private String extension;
|
||||
private String filename;
|
||||
|
||||
public InvalidExtensionException(String[] allowedExtension, String extension, String filename)
|
||||
{
|
||||
super("filename : [" + filename + "], extension : [" + extension + "], allowed extension : [" + Arrays.toString(allowedExtension) + "]");
|
||||
this.allowedExtension = allowedExtension;
|
||||
this.extension = extension;
|
||||
this.filename = filename;
|
||||
}
|
||||
|
||||
public String[] getAllowedExtension()
|
||||
{
|
||||
return allowedExtension;
|
||||
}
|
||||
|
||||
public String getExtension()
|
||||
{
|
||||
return extension;
|
||||
}
|
||||
|
||||
public String getFilename()
|
||||
{
|
||||
return filename;
|
||||
}
|
||||
|
||||
public static class InvalidImageExtensionException extends InvalidExtensionException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename)
|
||||
{
|
||||
super(allowedExtension, extension, filename);
|
||||
}
|
||||
}
|
||||
|
||||
public static class InvalidFlashExtensionException extends InvalidExtensionException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename)
|
||||
{
|
||||
super(allowedExtension, extension, filename);
|
||||
}
|
||||
}
|
||||
|
||||
public static class InvalidMediaExtensionException extends InvalidExtensionException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename)
|
||||
{
|
||||
super(allowedExtension, extension, filename);
|
||||
}
|
||||
}
|
||||
|
||||
public static class InvalidVideoExtensionException extends InvalidExtensionException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public InvalidVideoExtensionException(String[] allowedExtension, String extension, String filename)
|
||||
{
|
||||
super(allowedExtension, extension, filename);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.hw.common.core.exception.job;
|
||||
|
||||
/**
|
||||
* 计划策略异常
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class TaskException extends Exception
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Code code;
|
||||
|
||||
public TaskException(String msg, Code code)
|
||||
{
|
||||
this(msg, code, null);
|
||||
}
|
||||
|
||||
public TaskException(String msg, Code code, Exception nestedEx)
|
||||
{
|
||||
super(msg, nestedEx);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public Code getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public enum Code
|
||||
{
|
||||
TASK_EXISTS, NO_TASK_EXISTS, TASK_ALREADY_STARTED, UNKNOWN, CONFIG_ERROR, TASK_NODE_NOT_AVAILABLE
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.hw.common.core.exception.user;
|
||||
|
||||
/**
|
||||
* 验证码失效异常类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class CaptchaExpireException extends UserException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public CaptchaExpireException()
|
||||
{
|
||||
super("user.jcaptcha.expire", null);
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue