mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-15 15:13:51 +08:00
v3.0.0
This commit is contained in:
@@ -1,25 +1,51 @@
|
||||
server:
|
||||
servlet:
|
||||
context-path: '/'
|
||||
port: 1024
|
||||
# tomcat 配置,主要用于 配置 访问日志(便于将来排查错误)
|
||||
tomcat:
|
||||
basedir: ${localPath:/home}/logs/smart_admin_v2/dev/tomcat-logs
|
||||
accesslog:
|
||||
enabled: true
|
||||
pattern: '%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms)'
|
||||
#############################################################################################################
|
||||
# #
|
||||
# 为了减少重复配置,本配置文件为此sa-admin的独有配置,更多配置请查看 sa-base 项目中的 sa-base.yaml 通用配置文件。 #
|
||||
# 其中此文件中配置可以覆盖 sa-base.yaml 中的通用配置,具体实现类请看类:YamlProcessor.java #
|
||||
# #
|
||||
#############################################################################################################
|
||||
|
||||
# 项目配置: 名称、日志目录
|
||||
project:
|
||||
name: sa-admin
|
||||
log-directory: /home/smart-admin/${project.name}/${spring.profiles.active}
|
||||
|
||||
# 项目端口和url根路径
|
||||
server:
|
||||
port: 1024
|
||||
servlet:
|
||||
context-path: /
|
||||
|
||||
# 环境
|
||||
spring:
|
||||
profiles:
|
||||
active: '@profiles.active@'
|
||||
|
||||
# 项目配置
|
||||
project:
|
||||
name: sa-admin
|
||||
module: net.lab1024.sa.admin.module
|
||||
|
||||
# swagger文档
|
||||
swagger:
|
||||
host: localhost:${server.port}
|
||||
tag-class: net.lab1024.sa.admin.constant.AdminSwaggerTagConst
|
||||
|
||||
|
||||
####################################### 安全等级保护 相关配置 ##################################################
|
||||
# #
|
||||
# 建议开启 "三级等保" 所要求的配置,具体如下: #
|
||||
# 1)连续登录失败 5 次锁定账户 30 分钟, #
|
||||
# 2)登录超时时长建议为 30分钟,超过此时间没有访问系统会重新要求登录 #
|
||||
# 3)密码复杂度至少三种字符,最小 8 位 #
|
||||
# #
|
||||
#############################################################################################################
|
||||
|
||||
classified-protect:
|
||||
# 连续登录失败次数则锁定,-1表示不受限制,可以一直尝试登录
|
||||
login-max-fail-times: 5
|
||||
# 连续登录失败锁定时间(单位:秒),-1表示不锁定,建议锁定30分钟
|
||||
login-fail-locked-seconds: 1800
|
||||
# 密码复杂度开启(默认复杂度为:至少三种字符,最小 8 位), true 开启,false 不开启,建议开启
|
||||
password-complexity-enabled: true
|
||||
|
||||
sa-token:
|
||||
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
|
||||
active-timeout: 1800
|
||||
# token 有效期(单位:秒) 1天(86400秒),-1 代表永久有效
|
||||
timeout: 86400
|
||||
@@ -5,15 +5,15 @@
|
||||
-->
|
||||
<Configuration status="INFO" monitorInterval="30">
|
||||
<Properties>
|
||||
<Property name="log-path">$${env:localPath:-/home}/logs/smart_admin_v2/dev</Property>
|
||||
<Property name="log-directory" value="${sys:project.log-directory}"/>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
</Console>
|
||||
<RollingFile name="debug" fileName="${log-path}/debug/smart-admin_debug.log"
|
||||
filePattern="${log-path}/debug/smart-admin_debug_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
||||
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -24,14 +24,14 @@
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/debug" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_debug_*.log"/>
|
||||
<Delete basePath="${log-directory}/debug" maxDepth="1">
|
||||
<IfFileName glob="debug-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="info" fileName="${log-path}/info/smart-admin_info.log"
|
||||
filePattern="${log-path}/info/smart-admin_info_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="info" fileName="${log-directory}/info/info.log"
|
||||
filePattern="${log-directory}/info/info-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -42,14 +42,14 @@
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/info" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_info_*.log"/>
|
||||
<Delete basePath="${log-directory}/info" maxDepth="1">
|
||||
<IfFileName glob="info-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="warn" fileName="${log-path}/warn/smart-admin_warn.log"
|
||||
filePattern="${log-path}/warn/smart-admin_warn_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="warn" fileName="${log-directory}/warn/warn.log"
|
||||
filePattern="${log-directory}/warn/warn-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -60,14 +60,14 @@
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/warn" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_warn_*.log"/>
|
||||
<Delete basePath="${log-directory}/warn" maxDepth="1">
|
||||
<IfFileName glob="warn-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="error" fileName="${log-path}/error/smart-admin_error.log"
|
||||
filePattern="${log-path}/error/smart-admin_error_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="error" fileName="${log-directory}/error/error.log"
|
||||
filePattern="${log-directory}/error/error-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -78,15 +78,34 @@
|
||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/error" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_error_*.log"/>
|
||||
<Delete basePath="${log-directory}/error" maxDepth="1">
|
||||
<IfFileName glob="error-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
||||
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.log">
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="60">
|
||||
<Delete basePath="${log-directory}/slow-sql" maxDepth="1">
|
||||
<IfFileName glob="slow-sql-*.log"/>
|
||||
<IfLastModified age="30d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
</Appenders>
|
||||
|
||||
<Loggers>
|
||||
|
||||
<logger name="com.alibaba.druid.filter.stat.StatFilter" level="ERROR" additivity="false">
|
||||
<AppenderRef ref="druidSlowSqlLog"/>
|
||||
</logger>
|
||||
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="Console"/>
|
||||
<AppenderRef ref="debug"/>
|
||||
@@ -1,4 +1,4 @@
|
||||
#相关的包
|
||||
#相关的包
|
||||
modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
|
||||
# 日志格式
|
||||
logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
AND enterprise_id != #{excludeEnterpriseId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryPage"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseVO">
|
||||
SELECT t_oa_enterprise.*
|
||||
@@ -24,7 +25,7 @@
|
||||
deleted_flag = #{queryForm.deletedFlag}
|
||||
<if test="queryForm.keywords != null and queryForm.keywords != ''">
|
||||
AND (INSTR(enterprise_name,#{queryForm.keywords}) OR INSTR(contact,#{queryForm.keywords}) OR
|
||||
INSTR(contact_phone,#{queryForm.keywords}) OR INSTR(create_name,#{queryForm.keywords}))
|
||||
INSTR(contact_phone,#{queryForm.keywords}) OR INSTR(create_user_name,#{queryForm.keywords}))
|
||||
</if>
|
||||
<if test="queryForm.startTime != null">
|
||||
AND DATE_FORMAT(create_time, '%Y-%m-%d') >= #{queryForm.startTime}
|
||||
@@ -40,6 +41,34 @@
|
||||
ORDER BY create_time DESC
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectExcelExportData"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseExcelVO">
|
||||
SELECT t_oa_enterprise.*
|
||||
FROM t_oa_enterprise
|
||||
<where>
|
||||
deleted_flag = #{queryForm.deletedFlag}
|
||||
<if test="queryForm.keywords != null and queryForm.keywords != ''">
|
||||
AND (INSTR(enterprise_name,#{queryForm.keywords}) OR INSTR(contact,#{queryForm.keywords}) OR
|
||||
INSTR(contact_phone,#{queryForm.keywords}) OR INSTR(create_user_name,#{queryForm.keywords}))
|
||||
</if>
|
||||
<if test="queryForm.startTime != null">
|
||||
AND DATE_FORMAT(create_time, '%Y-%m-%d') >= #{queryForm.startTime}
|
||||
</if>
|
||||
<if test="queryForm.endTime != null">
|
||||
AND DATE_FORMAT(create_time, '%Y-%m-%d') <= #{queryForm.endTime}
|
||||
</if>
|
||||
<if test="queryForm.disabledFlag != null">
|
||||
AND disabled_flag = #{queryForm.disabledFlag}
|
||||
</if>
|
||||
</where>
|
||||
<if test="queryForm.sortItemList == null or queryForm.sortItemList.size == 0">
|
||||
ORDER BY create_time DESC
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="queryList"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseListVO">
|
||||
SELECT enterprise_id, enterprise_name
|
||||
@@ -56,4 +85,5 @@
|
||||
FROM t_oa_enterprise oe
|
||||
WHERE oe.enterprise_id = #{enterpriseId} AND oe.deleted_flag = #{deletedFlag}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -7,6 +7,13 @@
|
||||
type="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO"></resultMap>
|
||||
|
||||
|
||||
<select id="selectRoleByEmployeeId" resultType="net.lab1024.sa.admin.module.system.role.domain.vo.RoleVO">
|
||||
SELECT t_role.*
|
||||
FROM t_role_employee
|
||||
left join t_role on t_role_employee.role_id = t_role.role_id
|
||||
WHERE t_role_employee.employee_id = #{employeeId}
|
||||
</select>
|
||||
|
||||
<select id="selectRoleIdByEmployeeId" resultType="java.lang.Long">
|
||||
SELECT er.role_id
|
||||
FROM t_role_employee er
|
||||
@@ -33,9 +40,9 @@
|
||||
<where>
|
||||
<if test="queryForm.keywords != null and queryForm.keywords!= ''">
|
||||
AND (
|
||||
INSTR(t_employeeactual_name,#{queryForm.keywords})
|
||||
OR INSTR(t_employeephone,#{queryForm.keywords})
|
||||
OR INSTR(t_employeelogin_name,#{queryForm.keywords})
|
||||
INSTR(t_employee.actual_name,#{queryForm.keywords})
|
||||
OR INSTR(t_employee.phone,#{queryForm.keywords})
|
||||
OR INSTR(t_employee.login_name,#{queryForm.keywords})
|
||||
)
|
||||
</if>
|
||||
<if test="queryForm.roleId != null">
|
||||
|
||||
@@ -12,4 +12,10 @@
|
||||
WHERE role_name = #{roleName}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getByRoleCode" resultMap="RoleEntity">
|
||||
SELECT *
|
||||
FROM t_role
|
||||
WHERE role_code = #{roleCode}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,25 +1,51 @@
|
||||
server:
|
||||
servlet:
|
||||
context-path: '/'
|
||||
port: 1024
|
||||
# tomcat 配置,主要用于 配置 访问日志(便于将来排查错误)
|
||||
tomcat:
|
||||
basedir: ${localPath:/home}/logs/smart_admin_v2/pre/tomcat-logs
|
||||
accesslog:
|
||||
enabled: true
|
||||
pattern: '%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms)'
|
||||
#############################################################################################################
|
||||
# #
|
||||
# 为了减少重复配置,本配置文件为此sa-admin的独有配置,更多配置请查看 sa-base 项目中的 sa-base.yaml 通用配置文件。 #
|
||||
# 其中此文件中配置可以覆盖 sa-base.yaml 中的通用配置,具体实现类请看类:YamlProcessor.java #
|
||||
# #
|
||||
#############################################################################################################
|
||||
|
||||
# 项目配置: 名称、日志目录
|
||||
project:
|
||||
name: sa-admin
|
||||
log-directory: /home/smart-admin/${project.name}/${spring.profiles.active}
|
||||
|
||||
# 项目端口和url根路径
|
||||
server:
|
||||
port: 1024
|
||||
servlet:
|
||||
context-path: /
|
||||
|
||||
# 环境
|
||||
spring:
|
||||
profiles:
|
||||
active: '@profiles.active@'
|
||||
|
||||
# 项目配置
|
||||
project:
|
||||
name: sa-admin
|
||||
module: net.lab1024.sa.admin.module
|
||||
|
||||
# swagger文档
|
||||
swagger:
|
||||
host: localhost:${server.port}
|
||||
tag-class: net.lab1024.sa.admin.constant.AdminSwaggerTagConst
|
||||
|
||||
|
||||
####################################### 安全等级保护 相关配置 ##################################################
|
||||
# #
|
||||
# 建议开启 "三级等保" 所要求的配置,具体如下: #
|
||||
# 1)连续登录失败 5 次锁定账户 30 分钟, #
|
||||
# 2)登录超时时长建议为 30分钟,超过此时间没有访问系统会重新要求登录 #
|
||||
# 3)密码复杂度至少三种字符,最小 8 位 #
|
||||
# #
|
||||
#############################################################################################################
|
||||
|
||||
classified-protect:
|
||||
# 连续登录失败次数则锁定,-1表示不受限制,可以一直尝试登录
|
||||
login-max-fail-times: 5
|
||||
# 连续登录失败锁定时间(单位:秒),-1表示不锁定,建议锁定30分钟
|
||||
login-fail-locked-seconds: 1800
|
||||
# 密码复杂度开启(默认复杂度为:至少三种字符,最小 8 位), true 开启,false 不开启,建议开启
|
||||
password-complexity-enabled: true
|
||||
|
||||
sa-token:
|
||||
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
|
||||
active-timeout: 1800
|
||||
# token 有效期(单位:秒) 1天(86400秒),-1 代表永久有效
|
||||
timeout: 86400
|
||||
@@ -5,15 +5,15 @@
|
||||
-->
|
||||
<Configuration status="INFO" monitorInterval="30">
|
||||
<Properties>
|
||||
<Property name="log-path">$${env:localPath:-/home}/logs/smart_admin_v2/pre</Property>
|
||||
<Property name="log-directory" value="${sys:project.log-directory}"/>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
</Console>
|
||||
<RollingFile name="debug" fileName="${log-path}/debug/smart-admin_debug.log"
|
||||
filePattern="${log-path}/debug/smart-admin_debug_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
||||
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -24,14 +24,14 @@
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/debug" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_debug_*.log"/>
|
||||
<Delete basePath="${log-directory}/debug" maxDepth="1">
|
||||
<IfFileName glob="debug-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="info" fileName="${log-path}/info/smart-admin_info.log"
|
||||
filePattern="${log-path}/info/smart-admin_info_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="info" fileName="${log-directory}/info/info.log"
|
||||
filePattern="${log-directory}/info/info-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -42,14 +42,14 @@
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/info" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_info_*.log"/>
|
||||
<Delete basePath="${log-directory}/info" maxDepth="1">
|
||||
<IfFileName glob="info-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="warn" fileName="${log-path}/warn/smart-admin_warn.log"
|
||||
filePattern="${log-path}/warn/smart-admin_warn_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="warn" fileName="${log-directory}/warn/warn.log"
|
||||
filePattern="${log-directory}/warn/warn-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -60,14 +60,14 @@
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/warn" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_warn_*.log"/>
|
||||
<Delete basePath="${log-directory}/warn" maxDepth="1">
|
||||
<IfFileName glob="warn-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="error" fileName="${log-path}/error/smart-admin_error.log"
|
||||
filePattern="${log-path}/error/smart-admin_error_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="error" fileName="${log-directory}/error/error.log"
|
||||
filePattern="${log-directory}/error/error-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -78,15 +78,34 @@
|
||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/error" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_error_*.log"/>
|
||||
<Delete basePath="${log-directory}/error" maxDepth="1">
|
||||
<IfFileName glob="error-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
||||
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.log">
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="60">
|
||||
<Delete basePath="${log-directory}/slow-sql" maxDepth="1">
|
||||
<IfFileName glob="slow-sql-*.log"/>
|
||||
<IfLastModified age="30d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
</Appenders>
|
||||
|
||||
<Loggers>
|
||||
|
||||
<logger name="com.alibaba.druid.filter.stat.StatFilter" level="ERROR" additivity="false">
|
||||
<AppenderRef ref="druidSlowSqlLog"/>
|
||||
</logger>
|
||||
|
||||
<Root level="info">
|
||||
<AppenderRef ref="Console"/>
|
||||
<AppenderRef ref="debug"/>
|
||||
@@ -1,25 +1,51 @@
|
||||
server:
|
||||
servlet:
|
||||
context-path: '/'
|
||||
port: 1024
|
||||
# tomcat 配置,主要用于 配置 访问日志(便于将来排查错误)
|
||||
tomcat:
|
||||
basedir: ${localPath:/home}/logs/smart_admin_v2/prod/tomcat-logs
|
||||
accesslog:
|
||||
enabled: true
|
||||
pattern: '%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms)'
|
||||
#############################################################################################################
|
||||
# #
|
||||
# 为了减少重复配置,本配置文件为此sa-admin的独有配置,更多配置请查看 sa-base 项目中的 sa-base.yaml 通用配置文件。 #
|
||||
# 其中此文件中配置可以覆盖 sa-base.yaml 中的通用配置,具体实现类请看类:YamlProcessor.java #
|
||||
# #
|
||||
#############################################################################################################
|
||||
|
||||
# 项目配置: 名称、日志目录
|
||||
project:
|
||||
name: sa-admin
|
||||
log-directory: /home/smart-admin/${project.name}/${spring.profiles.active}
|
||||
|
||||
# 项目端口和url根路径
|
||||
server:
|
||||
port: 1024
|
||||
servlet:
|
||||
context-path: /
|
||||
|
||||
# 环境
|
||||
spring:
|
||||
profiles:
|
||||
active: '@profiles.active@'
|
||||
|
||||
# 项目配置
|
||||
project:
|
||||
name: sa-admin
|
||||
module: net.lab1024.sa.admin.module
|
||||
|
||||
# swagger文档
|
||||
swagger:
|
||||
host: localhost:${server.port}
|
||||
tag-class: net.lab1024.sa.admin.constant.AdminSwaggerTagConst
|
||||
|
||||
|
||||
####################################### 安全等级保护 相关配置 ##################################################
|
||||
# #
|
||||
# 建议开启 "三级等保" 所要求的配置,具体如下: #
|
||||
# 1)连续登录失败 5 次锁定账户 30 分钟, #
|
||||
# 2)登录超时时长建议为 30分钟,超过此时间没有访问系统会重新要求登录 #
|
||||
# 3)密码复杂度至少三种字符,最小 8 位 #
|
||||
# #
|
||||
#############################################################################################################
|
||||
|
||||
classified-protect:
|
||||
# 连续登录失败次数则锁定,-1表示不受限制,可以一直尝试登录
|
||||
login-max-fail-times: 5
|
||||
# 连续登录失败锁定时间(单位:秒),-1表示不锁定,建议锁定30分钟
|
||||
login-fail-locked-seconds: 1800
|
||||
# 密码复杂度开启(默认复杂度为:至少三种字符,最小 8 位), true 开启,false 不开启,建议开启
|
||||
password-complexity-enabled: true
|
||||
|
||||
sa-token:
|
||||
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
|
||||
active-timeout: 1800
|
||||
# token 有效期(单位:秒) 1天(86400秒),-1 代表永久有效
|
||||
timeout: 86400
|
||||
@@ -5,15 +5,15 @@
|
||||
-->
|
||||
<Configuration status="INFO" monitorInterval="30">
|
||||
<Properties>
|
||||
<Property name="log-path">$${env:localPath:-/home}/logs/smart_admin_v2/prod</Property>
|
||||
<Property name="log-directory" value="${sys:project.log-directory}"/>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
</Console>
|
||||
<RollingFile name="debug" fileName="${log-path}/debug/smart-admin_debug.log"
|
||||
filePattern="${log-path}/debug/smart-admin_debug_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
||||
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -24,14 +24,14 @@
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/debug" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_debug_*.log"/>
|
||||
<Delete basePath="${log-directory}/debug" maxDepth="1">
|
||||
<IfFileName glob="debug-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="info" fileName="${log-path}/info/smart-admin_info.log"
|
||||
filePattern="${log-path}/info/smart-admin_info_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="info" fileName="${log-directory}/info/info.log"
|
||||
filePattern="${log-directory}/info/info-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -42,14 +42,14 @@
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/info" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_info_*.log"/>
|
||||
<Delete basePath="${log-directory}/info" maxDepth="1">
|
||||
<IfFileName glob="info-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="warn" fileName="${log-path}/warn/smart-admin_warn.log"
|
||||
filePattern="${log-path}/warn/smart-admin_warn_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="warn" fileName="${log-directory}/warn/warn.log"
|
||||
filePattern="${log-directory}/warn/warn-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -60,14 +60,14 @@
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/warn" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_warn_*.log"/>
|
||||
<Delete basePath="${log-directory}/warn" maxDepth="1">
|
||||
<IfFileName glob="warn-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="error" fileName="${log-path}/error/smart-admin_error.log"
|
||||
filePattern="${log-path}/error/smart-admin_error_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="error" fileName="${log-directory}/error/error.log"
|
||||
filePattern="${log-directory}/error/error-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -78,15 +78,34 @@
|
||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/error" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_error_*.log"/>
|
||||
<Delete basePath="${log-directory}/error" maxDepth="1">
|
||||
<IfFileName glob="error-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
||||
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.log">
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="60">
|
||||
<Delete basePath="${log-directory}/slow-sql" maxDepth="1">
|
||||
<IfFileName glob="slow-sql-*.log"/>
|
||||
<IfLastModified age="30d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
</Appenders>
|
||||
|
||||
<Loggers>
|
||||
|
||||
<logger name="com.alibaba.druid.filter.stat.StatFilter" level="ERROR" additivity="false">
|
||||
<AppenderRef ref="druidSlowSqlLog"/>
|
||||
</logger>
|
||||
|
||||
<Root level="warn">
|
||||
<AppenderRef ref="Console"/>
|
||||
<AppenderRef ref="debug"/>
|
||||
@@ -1,25 +1,51 @@
|
||||
server:
|
||||
servlet:
|
||||
context-path: '/'
|
||||
port: 1024
|
||||
# tomcat 配置,主要用于 配置 访问日志(便于将来排查错误)
|
||||
tomcat:
|
||||
basedir: ${localPath:/home}/logs/smart_admin_v2/test/tomcat-logs
|
||||
accesslog:
|
||||
enabled: true
|
||||
pattern: '%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms)'
|
||||
#############################################################################################################
|
||||
# #
|
||||
# 为了减少重复配置,本配置文件为此sa-admin的独有配置,更多配置请查看 sa-base 项目中的 sa-base.yaml 通用配置文件。 #
|
||||
# 其中此文件中配置可以覆盖 sa-base.yaml 中的通用配置,具体实现类请看类:YamlProcessor.java #
|
||||
# #
|
||||
#############################################################################################################
|
||||
|
||||
# 项目配置: 名称、日志目录
|
||||
project:
|
||||
name: sa-admin
|
||||
log-directory: /home/smart-admin/${project.name}/${spring.profiles.active}
|
||||
|
||||
# 项目端口和url根路径
|
||||
server:
|
||||
port: 1024
|
||||
servlet:
|
||||
context-path: /
|
||||
|
||||
# 环境
|
||||
spring:
|
||||
profiles:
|
||||
active: '@profiles.active@'
|
||||
|
||||
# 项目配置
|
||||
project:
|
||||
name: sa-admin
|
||||
module: net.lab1024.sa.admin.module
|
||||
|
||||
# swagger文档
|
||||
swagger:
|
||||
host: localhost:${server.port}
|
||||
tag-class: net.lab1024.sa.admin.constant.AdminSwaggerTagConst
|
||||
|
||||
|
||||
####################################### 安全等级保护 相关配置 ##################################################
|
||||
# #
|
||||
# 建议开启 "三级等保" 所要求的配置,具体如下: #
|
||||
# 1)连续登录失败 5 次锁定账户 30 分钟, #
|
||||
# 2)登录超时时长建议为 30分钟,超过此时间没有访问系统会重新要求登录 #
|
||||
# 3)密码复杂度至少三种字符,最小 8 位 #
|
||||
# #
|
||||
#############################################################################################################
|
||||
|
||||
classified-protect:
|
||||
# 连续登录失败次数则锁定,-1表示不受限制,可以一直尝试登录
|
||||
login-max-fail-times: 5
|
||||
# 连续登录失败锁定时间(单位:秒),-1表示不锁定,建议锁定30分钟
|
||||
login-fail-locked-seconds: 1800
|
||||
# 密码复杂度开启(默认复杂度为:至少三种字符,最小 8 位), true 开启,false 不开启,建议开启
|
||||
password-complexity-enabled: true
|
||||
|
||||
sa-token:
|
||||
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
|
||||
active-timeout: 1800
|
||||
# token 有效期(单位:秒) 1天(86400秒),-1 代表永久有效
|
||||
timeout: 86400
|
||||
@@ -5,15 +5,15 @@
|
||||
-->
|
||||
<Configuration status="INFO" monitorInterval="30">
|
||||
<Properties>
|
||||
<Property name="log-path">$${env:localPath:-/home}/logs/smart_admin_v2/test</Property>
|
||||
<Property name="log-directory" value="${sys:project.log-directory}"/>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
</Console>
|
||||
<RollingFile name="debug" fileName="${log-path}/debug/smart-admin_debug.log"
|
||||
filePattern="${log-path}/debug/smart-admin_debug_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
||||
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -24,14 +24,14 @@
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/debug" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_debug_*.log"/>
|
||||
<Delete basePath="${log-directory}/debug" maxDepth="1">
|
||||
<IfFileName glob="debug-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="info" fileName="${log-path}/info/smart-admin_info.log"
|
||||
filePattern="${log-path}/info/smart-admin_info_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="info" fileName="${log-directory}/info/info.log"
|
||||
filePattern="${log-directory}/info/info-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -42,14 +42,14 @@
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/info" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_info_*.log"/>
|
||||
<Delete basePath="${log-directory}/info" maxDepth="1">
|
||||
<IfFileName glob="info-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="warn" fileName="${log-path}/warn/smart-admin_warn.log"
|
||||
filePattern="${log-path}/warn/smart-admin_warn_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="warn" fileName="${log-directory}/warn/warn.log"
|
||||
filePattern="${log-directory}/warn/warn-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -60,14 +60,14 @@
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/warn" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_warn_*.log"/>
|
||||
<Delete basePath="${log-directory}/warn" maxDepth="1">
|
||||
<IfFileName glob="warn-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="error" fileName="${log-path}/error/smart-admin_error.log"
|
||||
filePattern="${log-path}/error/smart-admin_error_%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="error" fileName="${log-directory}/error/error.log"
|
||||
filePattern="${log-directory}/error/error-%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
@@ -78,15 +78,34 @@
|
||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/error" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_error_*.log"/>
|
||||
<Delete basePath="${log-directory}/error" maxDepth="1">
|
||||
<IfFileName glob="error-*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
||||
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.log">
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="60">
|
||||
<Delete basePath="${log-directory}/slow-sql" maxDepth="1">
|
||||
<IfFileName glob="slow-sql-*.log"/>
|
||||
<IfLastModified age="30d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
</Appenders>
|
||||
|
||||
<Loggers>
|
||||
|
||||
<logger name="com.alibaba.druid.filter.stat.StatFilter" level="ERROR" additivity="false">
|
||||
<AppenderRef ref="druidSlowSqlLog"/>
|
||||
</logger>
|
||||
|
||||
<Root level="info">
|
||||
<AppenderRef ref="Console"/>
|
||||
<AppenderRef ref="debug"/>
|
||||
@@ -1,4 +1,4 @@
|
||||
#相关的包
|
||||
#相关的包
|
||||
modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
|
||||
# 日志格式
|
||||
logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
|
||||
|
||||
Reference in New Issue
Block a user