This commit is contained in:
parent
f523b8a996
commit
bf9b1abec6
|
@ -1,38 +0,0 @@
|
||||||
target/
|
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
|
||||||
!**/src/main/**/target/
|
|
||||||
!**/src/test/**/target/
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea/modules.xml
|
|
||||||
.idea/jarRepositories.xml
|
|
||||||
.idea/compiler.xml
|
|
||||||
.idea/libraries/
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
|
|
||||||
### Eclipse ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
.sts4-cache
|
|
||||||
|
|
||||||
### NetBeans ###
|
|
||||||
/nbproject/private/
|
|
||||||
/nbbuild/
|
|
||||||
/dist/
|
|
||||||
/nbdist/
|
|
||||||
/.nb-gradle/
|
|
||||||
build/
|
|
||||||
!**/src/main/**/build/
|
|
||||||
!**/src/test/**/build/
|
|
||||||
|
|
||||||
### VS Code ###
|
|
||||||
.vscode/
|
|
||||||
|
|
||||||
### Mac OS ###
|
|
||||||
.DS_Store
|
|
|
@ -6,3 +6,5 @@
|
||||||
# Datasource local storage ignored files
|
# Datasource local storage ignored files
|
||||||
/dataSources/
|
/dataSources/
|
||||||
/dataSources.local.xml
|
/dataSources.local.xml
|
||||||
|
# GitHub Copilot persisted chat sessions
|
||||||
|
/copilot/chatSessions
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<annotationProcessing>
|
||||||
|
<profile default="true" name="Default" enabled="true" />
|
||||||
|
<profile name="Maven default annotation processors profile" enabled="true">
|
||||||
|
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||||
|
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||||
|
<outputRelativeToContentRoot value="true" />
|
||||||
|
<module name="common-mybatis-plus" />
|
||||||
|
<module name="hoe-auth" />
|
||||||
|
<module name="common-web" />
|
||||||
|
<module name="hoe-gateway" />
|
||||||
|
<module name="admin-boot" />
|
||||||
|
<module name="common-base" />
|
||||||
|
<module name="hoe-order" />
|
||||||
|
</profile>
|
||||||
|
</annotationProcessing>
|
||||||
|
<bytecodeTargetLevel>
|
||||||
|
<module name="admin-api" target="1.8" />
|
||||||
|
<module name="common-redis" target="1.8" />
|
||||||
|
</bytecodeTargetLevel>
|
||||||
|
</component>
|
||||||
|
<component name="JavacSettings">
|
||||||
|
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||||
|
<module name="admin-api" options="-parameters" />
|
||||||
|
<module name="admin-boot" options="-parameters" />
|
||||||
|
<module name="common-base" options="-parameters" />
|
||||||
|
<module name="common-mybatis-plus" options="-parameters" />
|
||||||
|
<module name="common-redis" options="-parameters" />
|
||||||
|
<module name="common-web" options="-parameters" />
|
||||||
|
<module name="hoe-admin" options="" />
|
||||||
|
<module name="hoe-auth" options="-parameters" />
|
||||||
|
<module name="hoe-common" options="" />
|
||||||
|
<module name="hoe-gateway" options="-parameters" />
|
||||||
|
<module name="hoe-order" options="-parameters" />
|
||||||
|
<module name="hoe-recovery" options="" />
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="central" />
|
||||||
|
<option name="url" value="https://maven.aliyun.com/nexus/content/groups/public" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="rdc-releases" />
|
||||||
|
<option name="name" value="rdc-releases" />
|
||||||
|
<option name="url" value="https://packages.aliyun.com/maven/repository/2129281-release-rn0pJN/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="rdc-snapshots" />
|
||||||
|
<option name="name" value="rdc-snapshots" />
|
||||||
|
<option name="url" value="https://packages.aliyun.com/maven/repository/2129281-snapshot-71ZAnr/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Central Repository" />
|
||||||
|
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="com.e-iceblue" />
|
||||||
|
<option name="name" value="com.e-iceblue" />
|
||||||
|
<option name="url" value="http://repo.e-iceblue.cn/repository/maven-public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="snapshots" />
|
||||||
|
<option name="name" value="snapshots" />
|
||||||
|
<option name="url" value="https://maven.aliyun.com/nexus/content/groups/public" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/hoe-recovery.iml" filepath="$PROJECT_DIR$/hoe-recovery.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,78 @@
|
||||||
|
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: hoe-admin
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true
|
||||||
|
profiles:
|
||||||
|
active: dev
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
# metadata:
|
||||||
|
# serviceGroup: ytChen
|
||||||
|
server-addr: localhost:8848
|
||||||
|
namespace: 11bfd099-10d6-4f2c-b969-58b76e435cce
|
||||||
|
config:
|
||||||
|
server-addr: localhost:8848
|
||||||
|
file-extension: yaml
|
||||||
|
prefix: hoe-admin
|
||||||
|
group: dev
|
||||||
|
namespace: 11bfd099-10d6-4f2c-b969-58b76e435cce
|
||||||
|
dynamic:
|
||||||
|
tp:
|
||||||
|
enabled: true
|
||||||
|
enabledBanner: true # 是否开启banner打印,默认true
|
||||||
|
enabledCollect: true # 是否开启监控指标采集,默认false
|
||||||
|
collectorTypes: micrometer,logging # 监控数据采集器类型(logging | micrometer | internal_logging),默认micrometer
|
||||||
|
logPath: /home/logs # 监控日志数据路径,默认 ${user.home}/logs,采集类型非logging不用配置
|
||||||
|
monitorInterval: 5 # 监控时间间隔(报警判断、指标采集),默认5s
|
||||||
|
platforms: # 通知报警平台配置
|
||||||
|
- platform: email
|
||||||
|
receivers: 1650611030@qq.com
|
||||||
|
tomcatTp: # tomcat webserver线程池配置
|
||||||
|
corePoolSize: 100
|
||||||
|
maximumPoolSize: 200
|
||||||
|
keepAliveTime: 60
|
||||||
|
executors: # 动态线程池配置
|
||||||
|
- threadPoolName: dtpExecutor
|
||||||
|
# 线程池别名
|
||||||
|
executorType: common # 线程池类型common、eager:适用于io密集型
|
||||||
|
corePoolSize: 5 # 核心线程数
|
||||||
|
maximumPoolSize: 18 # 最大线程数
|
||||||
|
queueCapacity: 400 # 任务队列容量
|
||||||
|
queueType: VariableLinkedBlockingQueue # 任务队列,查看源码QueueTypeEnum枚举类
|
||||||
|
rejectedHandlerType: CallerRunsPolicy # 拒绝策略,查看RejectedTypeEnum枚举类
|
||||||
|
keepAliveTime: 50
|
||||||
|
allowCoreThreadTimeOut: false # 是否允许核心线程池超时
|
||||||
|
threadNamePrefix: test # 线程名前缀
|
||||||
|
waitForTasksToCompleteOnShutdown: false # 参考spring线程池设计,优雅关闭线程池
|
||||||
|
awaitTerminationSeconds: 5 # 单位(s)
|
||||||
|
preStartAllCoreThreads: false # 是否预热所有核心线程,默认false
|
||||||
|
runTimeout: 200 # 任务执行超时阈值,目前只做告警用,单位(ms)
|
||||||
|
queueTimeout: 100 # 任务在队列等待超时阈值,目前只做告警用,单位(ms)
|
||||||
|
taskWrapperNames: [ "ttl" ] # 任务包装器名称,集成TaskWrapper接口
|
||||||
|
notifyItems: # 报警项,不配置自动会按默认值配置(变更通知、容量报警、活性报警、拒绝报警、任务超时报警)
|
||||||
|
- type: capacity # 报警项类型,查看源码 NotifyTypeEnum枚举类
|
||||||
|
enabled: true
|
||||||
|
threshold: 80 # 报警阈值
|
||||||
|
platforms: [ ding,wechat ] # 可选配置,不配置默认拿上层platforms配置的所以平台
|
||||||
|
interval: 120 # 报警间隔(单位:s)
|
||||||
|
- type: change
|
||||||
|
enabled: true
|
||||||
|
- type: liveness
|
||||||
|
enabled: true
|
||||||
|
threshold: 80
|
||||||
|
- type: reject
|
||||||
|
enabled: true
|
||||||
|
threshold: 1
|
||||||
|
- type: run_timeout
|
||||||
|
enabled: true
|
||||||
|
threshold: 1
|
||||||
|
- type: queue_timeout
|
||||||
|
enabled: true
|
||||||
|
threshold: 1
|
||||||
|
|
||||||
|
server:
|
||||||
|
port: 9002
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,53 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
|
<contextName>logback</contextName>
|
||||||
|
<property name="SYS_LOG_DIR" value="logs" />
|
||||||
|
<property name="LOG_FILE" value="demo.log" />
|
||||||
|
<property name="fileLayoutPattern"
|
||||||
|
value="%-20(%d{yyyyMMdd_HH:mm:ss.SSS} [%logger{10}][%thread] [%-4relative])
|
||||||
|
[%X{hostName} %X{requestId} %X{processId} %X{service.timing} ][%level] %msg%n" />
|
||||||
|
<property name="consoleLayoutPattern"
|
||||||
|
value="%-20(%d{yyyyMMdd_HH:mm:ss.SSS} [%logger][%thread] [%-4relative])
|
||||||
|
[%X{hostName} %X{requestId} %X{processId} %X{service.timing} ][%level] %msg%n" />
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<layout name="StandardFormat" class="ch.qos.logback.classic.PatternLayout">
|
||||||
|
<pattern>${consoleLayoutPattern}</pattern>
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!--输出到文件-->
|
||||||
|
<appender name="LOG_ROLLING"
|
||||||
|
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${SYS_LOG_DIR}/${LOG_FILE}</file>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter"> <!-- 日志过滤器,只记录warn级别日志 ,若要配置其他级别,复制appender,修改level,并在root中配置-->
|
||||||
|
<level>WARN</level>
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<fileNamePattern>${SYS_LOG_DIR}/%d{yyyy-MM-dd}/${LOG_FILE}_%d{yyyy-MM-dd}_%i.zip</fileNamePattern>
|
||||||
|
<timeBasedFileNamingAndTriggeringPolicy
|
||||||
|
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||||
|
<maxFileSize>50MB</maxFileSize>
|
||||||
|
</timeBasedFileNamingAndTriggeringPolicy>
|
||||||
|
</rollingPolicy>
|
||||||
|
<layout>
|
||||||
|
<pattern>${fileLayoutPattern}</pattern>
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
<root level="INFO">
|
||||||
|
<appender-ref ref="CONSOLE" /> <!-- 控制台输出 -->
|
||||||
|
<appender-ref ref="LOG_ROLLING" /> <!-- 文件输出 -->
|
||||||
|
</root>
|
||||||
|
<!-- 测试环境+开发环境. 多个使用逗号隔开. -->
|
||||||
|
<springProfile name="test,dev">
|
||||||
|
<logger name="com.recovery.admin.boot.controller" level="INFO" />
|
||||||
|
</springProfile>
|
||||||
|
<!-- 生产环境. -->
|
||||||
|
<springProfile name="prod">
|
||||||
|
<logger name="com.recovery.admin.boot.controller" level="ERROR" />
|
||||||
|
</springProfile>
|
||||||
|
|
||||||
|
</configuration>
|
|
@ -0,0 +1,175 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!-- 从高到地低 OFF 、 FATAL 、 ERROR 、 WARN 、 INFO 、 DEBUG 、 TRACE 、 ALL -->
|
||||||
|
<!-- 日志输出规则 根据当前ROOT 级别,日志输出时,级别高于root默认的级别时 会输出 -->
|
||||||
|
<!-- 以下 每个配置的 filter 是过滤掉输出文件里面,会出现高级别文件,依然出现低级别的日志信息,通过filter 过滤只记录本级别的日志-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 属性描述 scan:性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,
|
||||||
|
默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。
|
||||||
|
debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
|
||||||
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
|
<!-- 定义日志文件 输入位置 -->
|
||||||
|
<springProperty scope="context" name="logPath" source="log.path" defaultValue="logs"/>
|
||||||
|
<property name="log_dir" value="${logPath}/common" />
|
||||||
|
<!-- 日志最大的历史 30天 -->
|
||||||
|
<property name="maxHistory" value="30"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ConsoleAppender 控制台输出日志 -->
|
||||||
|
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<withJansi>true</withJansi>
|
||||||
|
<!-- 对日志进行格式化 -->
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %cyan(%logger{15}) - %highlight(%msg) %n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ERROR级别日志 -->
|
||||||
|
<!-- 滚动记录文件,先将日志记录到指定文件,当符合某个条件时,将日志记录到其他文件 RollingFileAppender-->
|
||||||
|
<appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<!-- 过滤器,只记录WARN级别的日志 -->
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<level>ERROR</level>
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
<!-- 最常用的滚动策略,它根据时间来制定滚动策略.既负责滚动也负责出发滚动 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!--日志输出位置 可相对、和绝对路径 -->
|
||||||
|
<fileNamePattern>${log_dir}/%d{yyyy-MM-dd}/error-log.log</fileNamePattern>
|
||||||
|
<!-- 可选节点,控制保留的归档文件的最大数量,超出数量就删除旧文件假设设置每个月滚动,且<maxHistory>是6,
|
||||||
|
则只保存最近6个月的文件,删除之前的旧文件。注意,删除旧文件是,那些为了归档而创建的目录也会被删除-->
|
||||||
|
<maxHistory>${maxHistory}</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
|
||||||
|
<!-- 按照固定窗口模式生成日志文件,当文件大于20MB时,生成新的日志文件。窗口大小是1到3,当保存了3个归档文件后,将覆盖最早的日志。
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||||
|
<fileNamePattern>${log_dir}/%d{yyyy-MM-dd}/.log.zip</fileNamePattern>
|
||||||
|
<minIndex>1</minIndex>
|
||||||
|
<maxIndex>3</maxIndex>
|
||||||
|
</rollingPolicy> -->
|
||||||
|
<!-- 查看当前活动文件的大小,如果超过指定大小会告知RollingFileAppender 触发当前活动文件滚动
|
||||||
|
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||||
|
<maxFileSize>5MB</maxFileSize>
|
||||||
|
</triggeringPolicy> -->
|
||||||
|
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- WARN级别日志 appender -->
|
||||||
|
<appender name="WARN" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<!-- 过滤器,只记录WARN级别的日志 -->
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<level>WARN</level>
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 按天回滚 daily -->
|
||||||
|
<fileNamePattern>${log_dir}/%d{yyyy-MM-dd}/warn-log.log
|
||||||
|
</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>${maxHistory}</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- INFO级别日志 appender -->
|
||||||
|
<appender name="INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<!-- 过滤器,只记录INFO级别的日志 -->
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<level>INFO</level>
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 按天回滚 daily -->
|
||||||
|
<fileNamePattern>${log_dir}/%d{yyyy-MM-dd}/info-log.log
|
||||||
|
</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>${maxHistory}</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- DEBUG级别日志 appender -->
|
||||||
|
<appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<!-- 过滤器,只记录DEBUG级别的日志 -->
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<level>DEBUG</level>
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 按天回滚 daily -->
|
||||||
|
<fileNamePattern>${log_dir}/%d{yyyy-MM-dd}/debug-log.log
|
||||||
|
</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>${maxHistory}</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- TRACE级别日志 appender -->
|
||||||
|
<appender name="TRACE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<!-- 过滤器,只记录ERROR级别的日志 -->
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<level>TRACE</level>
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 按天回滚 daily -->
|
||||||
|
<fileNamePattern>${log_dir}/%d{yyyy-MM-dd}/trace-log.log
|
||||||
|
</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>${maxHistory}</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
|
||||||
|
<logger name="java.sql.PreparedStatement" value="DEBUG" />
|
||||||
|
<logger name="java.sql.Connection" value="DEBUG" />
|
||||||
|
<logger name="java.sql.Statement" value="DEBUG" />
|
||||||
|
<logger name="com.recovery.admin.boot.aspect" value="DEBUG" />
|
||||||
|
|
||||||
|
|
||||||
|
<!-- root级别 DEBUG -->
|
||||||
|
<root level="INFO">
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender-ref ref="STDOUT" />
|
||||||
|
<!-- 文件输出 -->
|
||||||
|
<appender-ref ref="ERROR" />
|
||||||
|
<appender-ref ref="INFO" />
|
||||||
|
<appender-ref ref="WARN" />
|
||||||
|
<appender-ref ref="DEBUG" />
|
||||||
|
<appender-ref ref="TRACE" />
|
||||||
|
</root>
|
||||||
|
|
||||||
|
</configuration>
|
|
@ -0,0 +1,53 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.recovery.admin.boot.mapper.MemberUserMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.recovery.admin.boot.entity.MemberUser">
|
||||||
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
|
<result property="username" column="username" jdbcType="VARCHAR"/>
|
||||||
|
<result property="nickname" column="nickname" jdbcType="VARCHAR"/>
|
||||||
|
<result property="gender" column="gender" jdbcType="BOOLEAN"/>
|
||||||
|
<result property="password" column="password" jdbcType="VARCHAR"/>
|
||||||
|
<result property="avatar" column="avatar" jdbcType="VARCHAR"/>
|
||||||
|
<result property="mobile" column="mobile" jdbcType="VARCHAR"/>
|
||||||
|
<result property="status" column="status" jdbcType="BOOLEAN"/>
|
||||||
|
<result property="email" column="email" jdbcType="VARCHAR"/>
|
||||||
|
<result property="deleted" column="deleted" jdbcType="BOOLEAN"/>
|
||||||
|
<collection property="roles" ofType="string" javaType="list">
|
||||||
|
<result column="roleCode"></result>
|
||||||
|
</collection>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id
|
||||||
|
,username,nickname,
|
||||||
|
gender,password,dept_id,
|
||||||
|
avatar,mobile,status,
|
||||||
|
email,gmt_create,gmt_modified,
|
||||||
|
deleted
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<resultMap id="MemberUserAuthMap" type="com.recovery.common.base.dto.MemberUserAuthDTO">
|
||||||
|
<id property="userId" column="userId" jdbcType="BIGINT"/>
|
||||||
|
<result property="username" column="username" jdbcType="VARCHAR"/>
|
||||||
|
<result property="password" column="password" jdbcType="VARCHAR"/>
|
||||||
|
<result property="status" column="status" jdbcType="BOOLEAN"/>
|
||||||
|
<collection property="roles" ofType="string" javaType="list">
|
||||||
|
<result column="roleCode"></result>
|
||||||
|
</collection>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="getByUsername" resultMap="MemberUserAuthMap">
|
||||||
|
select t1.id userId, t1.username, t1.nickname, t1.password, t1.status, t3.code roleCode
|
||||||
|
from member_user t1,
|
||||||
|
sys_user_role t2,
|
||||||
|
sys_role t3
|
||||||
|
where t1.username = #{userName}
|
||||||
|
and t1.deleted = 0
|
||||||
|
and t1.id = t2.user_id
|
||||||
|
and t2.role_id = t3.id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.recovery.admin.boot.mapper.SysPermissionMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.recovery.admin.boot.entity.SysPermission">
|
||||||
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="menuId" column="menu_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="urlPerm" column="url_perm" jdbcType="VARCHAR"/>
|
||||||
|
<collection property="roles" ofType="String" javaType="list">
|
||||||
|
<result column="code"/>
|
||||||
|
</collection>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id
|
||||||
|
,name,menu_id,
|
||||||
|
url_perm,btn_perm,gmt_create,
|
||||||
|
gmt_modified
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="listPermRoles" resultMap="BaseResultMap">
|
||||||
|
SELECT t1.id,
|
||||||
|
t1.NAME,
|
||||||
|
t1.menu_id,
|
||||||
|
t1.url_perm,
|
||||||
|
t3.CODE
|
||||||
|
FROM sys_permission t1
|
||||||
|
LEFT JOIN sys_role_permission t2 ON t1.id = t2.permission_id
|
||||||
|
LEFT JOIN sys_role t3 ON t2.role_id = t3.id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.recovery.admin.boot.mapper.UserMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getByUsername" resultType="com.recovery.common.base.dto.UserAuthDTO">
|
||||||
|
select t1.user_name as userName,t1.password,t1.state as status,t1.id as userId
|
||||||
|
from tbl_user t1 where t1.user_name = #{userName}
|
||||||
|
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,74 @@
|
||||||
|
package com.recovery.auth.security.details.user;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class JwtAuthenticationRequest implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -8445943548965154778L;
|
||||||
|
|
||||||
|
private String username;
|
||||||
|
private String phone;
|
||||||
|
private String password;
|
||||||
|
private String verifyCode;
|
||||||
|
private String loginMethod;
|
||||||
|
private String visitorsType;
|
||||||
|
|
||||||
|
public JwtAuthenticationRequest(String username,String phone,String password,String verifyCode,String loginMethod,String visitorsType) {
|
||||||
|
this.username = username;
|
||||||
|
this.phone = phone;
|
||||||
|
this.password = password;
|
||||||
|
this.verifyCode = verifyCode;
|
||||||
|
this.loginMethod = loginMethod;
|
||||||
|
this.visitorsType = visitorsType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JwtAuthenticationRequest() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserPhone() {
|
||||||
|
return phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserPhone(String phone) {
|
||||||
|
this.phone = phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVerifyCode() {
|
||||||
|
return verifyCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVerifyCode(String verifyCode) {
|
||||||
|
this.verifyCode = verifyCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLoginMethod() {
|
||||||
|
return loginMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLoginMethod(String loginMethod) {
|
||||||
|
this.loginMethod = loginMethod;
|
||||||
|
}
|
||||||
|
public String getVisitorsType() {
|
||||||
|
return visitorsType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVisitorsType(String visitorsType) {
|
||||||
|
this.visitorsType = visitorsType;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: hoe-auth
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true
|
||||||
|
profiles:
|
||||||
|
active: dev
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
metadata:
|
||||||
|
serviceGroup: ytChen
|
||||||
|
server-addr: localhost:8848
|
||||||
|
namespace: 11bfd099-10d6-4f2c-b969-58b76e435cce
|
||||||
|
config:
|
||||||
|
server-addr: localhost:8848
|
||||||
|
file-extension: yaml
|
||||||
|
prefix: hoe-auth
|
||||||
|
group: dev
|
||||||
|
namespace: 11bfd099-10d6-4f2c-b969-58b76e435cce
|
||||||
|
server:
|
||||||
|
port: 9001
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
sa-token:
|
||||||
|
# jwt秘钥
|
||||||
|
jwt-secret-key: asdasdasifhueuiwyurfewbfjsdafjk123
|
||||||
|
token-name: satoken
|
||||||
|
timeout: -1
|
||||||
|
active-timeout: -1
|
||||||
|
is-concurrent: false
|
||||||
|
is-share: false
|
||||||
|
is-log: true
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.recovery.auth.mapper.OauthClientDetailsMapper">
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue