mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-12 04:16:51 +08:00
Compare commits
1 Commits
master-202
...
smartDoc-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d7f714562 |
@@ -240,6 +240,18 @@
|
|||||||
<version>2.3.0</version> <!-- 请根据实际需求选择版本 -->
|
<version>2.3.0</version> <!-- 请根据实际需求选择版本 -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.github.shalousun/smart-doc -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.shalousun</groupId>
|
||||||
|
<artifactId>smart-doc</artifactId>
|
||||||
|
<version>2.7.7</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.enterprise</groupId>
|
||||||
|
<artifactId>cdi-api</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
@@ -265,6 +277,28 @@
|
|||||||
<includeSystemScope>true</includeSystemScope>
|
<includeSystemScope>true</includeSystemScope>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.github.shalousun</groupId>
|
||||||
|
<artifactId>smart-doc-maven-plugin</artifactId>
|
||||||
|
<version>2.7.7</version>
|
||||||
|
<configuration>
|
||||||
|
<!--指定生成文档的使用的配置文件,配置文件放在自己的项目中-->
|
||||||
|
<configFile>./src/main/resources/smart-doc.json</configFile>
|
||||||
|
<!--指定项目名称,推荐使用动态参数,例如${project.description}-->
|
||||||
|
<!--如果smart-doc.json中和此处都未设置projectName,2.3.4开始,插件自动采用pom中的projectName作为设置-->
|
||||||
|
<projectName>${project.description}</projectName>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<!--如果不需要在执行编译时启动smart-doc,则将phase注释掉-->
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<!--smart-doc提供了html、openapi、markdown等goal,可按需配置-->
|
||||||
|
<goal>html</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<profiles>
|
<profiles>
|
||||||
|
|||||||
@@ -122,20 +122,13 @@ public class OutSideDataServiceImpl implements IOutSideDataService {
|
|||||||
//这里应该是单独的线程去处理
|
//这里应该是单独的线程去处理
|
||||||
user.setId(getNodeText(result.get("userId")));//最新接口变化,id改成userId
|
user.setId(getNodeText(result.get("userId")));//最新接口变化,id改成userId
|
||||||
String band=getNodeText(result.get("bandCode"));
|
String band=getNodeText(result.get("bandCode"));
|
||||||
try {
|
if(StringUtils.isNotBlank(band) && band.length()>4) {
|
||||||
if(StringUtils.isNotBlank(band) && band.length()>4 && band.contains("band")) {
|
String bandNum=band.substring(4);
|
||||||
String bandNum=band.substring(4);
|
user.setBandLevel(Integer.valueOf(bandNum));
|
||||||
user.setBandLevel(Integer.valueOf(bandNum));
|
}else {
|
||||||
}else if (StringUtils.isNotBlank(band) && band.length()>4 && band.contains("Level")) {
|
user.setBandLevel(0);
|
||||||
String bandNum=band.substring(5);
|
}
|
||||||
user.setBandLevel(Integer.valueOf(bandNum));
|
user.setAvatar(getNodeText(result.get("avatar")));
|
||||||
}else {
|
|
||||||
user.setBandLevel(0);
|
|
||||||
}
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
user.setBandLevel(0);
|
|
||||||
}
|
|
||||||
user.setAvatar(getNodeText(result.get("avatar")));
|
|
||||||
user.setCode(getNodeText(result.get("userNo")));
|
user.setCode(getNodeText(result.get("userNo")));
|
||||||
|
|
||||||
if(StringUtils.isBlank(user.getCode())) {
|
if(StringUtils.isBlank(user.getCode())) {
|
||||||
|
|||||||
@@ -140,9 +140,6 @@ public class CasesApi extends ApiBaseController {
|
|||||||
List<Cases> cases = views.getList();
|
List<Cases> cases = views.getList();
|
||||||
if (CollUtil.isNotEmpty(cases)) {
|
if (CollUtil.isNotEmpty(cases)) {
|
||||||
for (Cases c : cases) {
|
for (Cases c : cases) {
|
||||||
if ("null".equals(c.getSummary())) {
|
|
||||||
c.setSummary(null);
|
|
||||||
}
|
|
||||||
StringBuffer stringBuffer = new StringBuffer();
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
List<CasesMajorType> caseId = casesMajorTypeDao.findList(FieldFilters.eq("caseId", c.getId()));
|
List<CasesMajorType> caseId = casesMajorTypeDao.findList(FieldFilters.eq("caseId", c.getId()));
|
||||||
if (caseId != null && !caseId.isEmpty()) {
|
if (caseId != null && !caseId.isEmpty()) {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public interface ICasesRecommendPushRecordService {
|
|||||||
/**
|
/**
|
||||||
* 案例推送
|
* 案例推送
|
||||||
*
|
*
|
||||||
* @param
|
* @param boeParam
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
boolean launchPush(CasesRecommendLaunchVo casesRecommendLaunch, CurrentUser currentUser, String token);
|
boolean launchPush(CasesRecommendLaunchVo casesRecommendLaunch, CurrentUser currentUser, String token);
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public interface ICommentsService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询案例@的评论
|
* 查询案例@的评论
|
||||||
* @param
|
* @param boeParam
|
||||||
* */
|
* */
|
||||||
|
|
||||||
PageList<CommentsDto> findCasesTome(int pageIndex,int pageSize,Integer objType,String toaid,String uname,Boolean isread);
|
PageList<CommentsDto> findCasesTome(int pageIndex,int pageSize,Integer objType,String toaid,String uname,Boolean isread);
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 记录学习信息,在学习每个资源时都要记录.前端用户打开课程资源按规则调用带着课程及学习信息调用此接口。
|
* 记录学习信息,在学习每个资源时都要记录.前端用户打开课程资源按规则调用带着课程及学习信息调用此接口。
|
||||||
* @param
|
* @param boeParam
|
||||||
* @return 返回学习条目的id
|
* @return 返回学习条目的id
|
||||||
*/
|
*/
|
||||||
@PostMapping("/study")
|
@PostMapping("/study")
|
||||||
@@ -450,8 +450,8 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
* 音视频学习保存,初始化保存学习记录.
|
* 音视频学习保存,初始化保存学习记录.
|
||||||
* 如果已经保存,就不要再保存第二次了,前端注意控制
|
* 如果已经保存,就不要再保存第二次了,前端注意控制
|
||||||
* {studyId,contentId,courseId,progress,contentType,studyDuration}
|
* {studyId,contentId,courseId,progress,contentType,studyDuration}
|
||||||
* @param
|
* @param boeParam
|
||||||
* @param
|
* @param boeParam
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/study-video-save")
|
@PostMapping("/study-video-save")
|
||||||
@@ -506,8 +506,8 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 视频学习完
|
* 视频学习完
|
||||||
* @param
|
* @param boeParam
|
||||||
* @param
|
* @param boeParam
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/study-video-finish")
|
@PostMapping("/study-video-finish")
|
||||||
@@ -539,7 +539,7 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
/**
|
/**
|
||||||
* 记录视频的学习时间点,前端可以每10秒记录一次,时长是秒
|
* 记录视频的学习时间点,前端可以每10秒记录一次,时长是秒
|
||||||
* @param itemId 学习内容条目id
|
* @param itemId 学习内容条目id
|
||||||
* @param
|
* @param boeParam
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/study-video-time")
|
@PostMapping("/study-video-time")
|
||||||
|
|||||||
@@ -76,9 +76,9 @@ xboe:
|
|||||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
||||||
xxl:
|
xxl:
|
||||||
job:
|
job:
|
||||||
accessToken: 65ddc683-22f5-83b4-de3a-3c97a0a29af0
|
|
||||||
admin:
|
admin:
|
||||||
addresses: http://u.boe.com/jobAdmin
|
addresses: http://u.boe.com/jobAdmin
|
||||||
|
accessToken: 65ddc683-22f5-83b4-de3a-3c97a0a29af0
|
||||||
executor:
|
executor:
|
||||||
appname: java-servers-job-api
|
appname: java-servers-job-api
|
||||||
port: 9995
|
port: 9995
|
||||||
|
|||||||
@@ -1,183 +0,0 @@
|
|||||||
spring:
|
|
||||||
# application.yml
|
|
||||||
servlet:
|
|
||||||
multipart:
|
|
||||||
max-file-size: 1000MB
|
|
||||||
max-request-size: 1000MB
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
discovery:
|
|
||||||
server-addr: 10.251.186.27:8848
|
|
||||||
config:
|
|
||||||
server-addr: 10.251.186.27:8848
|
|
||||||
redis:
|
|
||||||
database: 1
|
|
||||||
host: 10.251.160.38
|
|
||||||
password: qwert!W577
|
|
||||||
port: 6379
|
|
||||||
lettuce:
|
|
||||||
pool:
|
|
||||||
max-active: 8
|
|
||||||
min-idle: 0
|
|
||||||
max-idle: 30
|
|
||||||
max-wait: 10000ms
|
|
||||||
shutdown-timeout: 100ms
|
|
||||||
jpa:
|
|
||||||
database: MYSQL
|
|
||||||
properties:
|
|
||||||
hibernate:
|
|
||||||
naming_strategy: org.hibernate.cfg.EJB3NamingStrategy
|
|
||||||
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
|
||||||
current_session_context_class: org.springframework.orm.hibernate5.SpringSessionContext
|
|
||||||
show-sql: true
|
|
||||||
hibernate:
|
|
||||||
ddl-auto: update
|
|
||||||
datasource:
|
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
|
||||||
url: jdbc:mysql://10.251.160.40:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull
|
|
||||||
username: admin
|
|
||||||
password: boeRds01
|
|
||||||
web:
|
|
||||||
resources:
|
|
||||||
static-locations: file:E:/Projects/BOE/10/static
|
|
||||||
server:
|
|
||||||
port: 9090
|
|
||||||
tomcat:
|
|
||||||
uri-encoding: UTF-8
|
|
||||||
servlet:
|
|
||||||
multipart:
|
|
||||||
maxFileSize: 1024MB
|
|
||||||
maxRequestSize: 1024MB
|
|
||||||
mvc:
|
|
||||||
static-path-pattern: /cdn/**
|
|
||||||
|
|
||||||
#logging.level.org.hibernate.SQL=DEBUG
|
|
||||||
#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
|
|
||||||
#logging.config=classpath:log/logback-@profileActive@.xml
|
|
||||||
|
|
||||||
# logging:
|
|
||||||
# config: classpath:log/logback-${spring.profiles.active}.xml
|
|
||||||
# level:
|
|
||||||
# org:
|
|
||||||
# hibernate:
|
|
||||||
# SQL: DEBUG
|
|
||||||
# type:
|
|
||||||
# descriptor:
|
|
||||||
# sql:
|
|
||||||
# BasicBinder: TRACE
|
|
||||||
|
|
||||||
xcaching:
|
|
||||||
specs:
|
|
||||||
favorites:
|
|
||||||
timeout: 10s
|
|
||||||
praises:
|
|
||||||
timeout: 10s
|
|
||||||
shares:
|
|
||||||
timeout: 10s
|
|
||||||
|
|
||||||
xboe:
|
|
||||||
api:
|
|
||||||
cross_filter: true
|
|
||||||
local:
|
|
||||||
dev: true
|
|
||||||
upload:
|
|
||||||
file:
|
|
||||||
temp_path: /tmp
|
|
||||||
save_path: /home/www/elearning/upload
|
|
||||||
http_path: http://10.251.186.27/upload
|
|
||||||
externalinterface:
|
|
||||||
url:
|
|
||||||
system: http://localhost:9091
|
|
||||||
old:
|
|
||||||
base:
|
|
||||||
url: http://10.251.186.27
|
|
||||||
server:
|
|
||||||
userbasic:
|
|
||||||
url: http://10.251.186.27/userbasic
|
|
||||||
stat:
|
|
||||||
base:
|
|
||||||
url: http://10.251.186.27:9080
|
|
||||||
elasticsearch:
|
|
||||||
server:
|
|
||||||
ip: 10.251.129.25
|
|
||||||
port: 9200
|
|
||||||
user: elastic
|
|
||||||
password: Boe@es123
|
|
||||||
email:
|
|
||||||
url: http://10.251.186.27/api/b1/email/send
|
|
||||||
from: boeu_learning@boe.com.cn
|
|
||||||
user:
|
|
||||||
security:
|
|
||||||
|
|
||||||
jasypt:
|
|
||||||
encryptor:
|
|
||||||
algorithm: PBEWithMD5AndDES
|
|
||||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
|
||||||
|
|
||||||
boe:
|
|
||||||
domain: http://10.251.186.27
|
|
||||||
|
|
||||||
ok:
|
|
||||||
http:
|
|
||||||
connect-timeout: 30
|
|
||||||
read-timeout: 30
|
|
||||||
write-timeout: 30
|
|
||||||
max-idle-connections: 200
|
|
||||||
keep-alive-duration: 300
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
orgTree:
|
|
||||||
orgTreeList: ${boe.domain}/userbasic/org/list
|
|
||||||
orgChildTreeList: ${boe.domain}/userbasic/org/childOrgs
|
|
||||||
|
|
||||||
userBasic:
|
|
||||||
searchUserList: ${boe.domain}/userbasic/user/list
|
|
||||||
getUserBasicInfo: ${boe.domain}/userbasic/user/getUserBasicInfo
|
|
||||||
getTeacherIds: ${boe.domain}/userbasic/user/getTeacherInfo
|
|
||||||
|
|
||||||
audience:
|
|
||||||
usersByAudienceList: ${boe.domain}/userbasic/audience/memberList
|
|
||||||
getOrgUsers: ${boe.domain}/userbasic/user/getOrgUsers
|
|
||||||
|
|
||||||
statApi:
|
|
||||||
userdynamicList: ${boe.domain}/statApi/xboe/m/stat/userdynamic/list
|
|
||||||
|
|
||||||
infrasApi:
|
|
||||||
dict: ${boe.domain}/infrasApi/dict/list
|
|
||||||
|
|
||||||
manageApi:
|
|
||||||
stu:
|
|
||||||
offcourse: ${boe.domain}/manageApi/stu/offcourse/getOffCourseId
|
|
||||||
editExam: ${boe.domain}/manageApi/admin/project/editExam
|
|
||||||
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
|
||||||
coursesuilt:
|
|
||||||
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
admin:
|
|
||||||
addresses: http://10.251.186.27/jobAdmin
|
|
||||||
accessToken: 65ddc683-22f5-83b4-de3a-3c97a0a29af0
|
|
||||||
executor:
|
|
||||||
appname: java-servers-job-api
|
|
||||||
port: 9995
|
|
||||||
address:
|
|
||||||
ip:
|
|
||||||
logpath: /var/log/xxl-job/system/
|
|
||||||
logretentiondays: 30
|
|
||||||
|
|
||||||
aop-log-record:
|
|
||||||
#是否开启日志记录
|
|
||||||
enabled: true
|
|
||||||
#不进行拦截的包或者类
|
|
||||||
excludeClassNames:
|
|
||||||
activemq:
|
|
||||||
broker-url: tcp://10.251.129.25:61616
|
|
||||||
user: admin
|
|
||||||
password: admin
|
|
||||||
elasticsearch:
|
|
||||||
host: 10.251.129.25
|
|
||||||
port: 9200
|
|
||||||
user: elastic
|
|
||||||
password: Boe@es123
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration debug="false" scan="false">
|
|
||||||
<springProperty scop="context" name="spring.application.name" source="spring.application.name" defaultValue=""/>
|
|
||||||
<property name="log.path" value="/home/logs/${spring.application.name}"/>
|
|
||||||
<!-- 彩色日志格式 -->
|
|
||||||
<property name="CONSOLE_LOG_PATTERN"
|
|
||||||
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
|
||||||
<!-- 彩色日志依赖的渲染类 -->
|
|
||||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
|
|
||||||
<conversionRule conversionWord="wex"
|
|
||||||
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
|
|
||||||
<conversionRule conversionWord="wEx"
|
|
||||||
converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
|
|
||||||
<!-- Console log output -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- Log file debug output -->
|
|
||||||
<appender name="info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/debug.log</file>
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
|
||||||
<fileNamePattern>${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
|
||||||
<maxFileSize>50MB</maxFileSize>
|
|
||||||
<maxHistory>30</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- Log file error output -->
|
|
||||||
<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
|
||||||
<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
|
||||||
<maxFileSize>50MB</maxFileSize>
|
|
||||||
<maxHistory>30</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
|
||||||
<level>ERROR</level>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
|
|
||||||
<root level="INFO">
|
|
||||||
<appender-ref ref="info"/>
|
|
||||||
<!-- <appender-ref ref="console"/>-->
|
|
||||||
<!-- <appender-ref ref="error"/> -->
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
||||||
@@ -51,6 +51,5 @@
|
|||||||
<root level="INFO">
|
<root level="INFO">
|
||||||
<appender-ref ref="debug"/>
|
<appender-ref ref="debug"/>
|
||||||
<appender-ref ref="error"/>
|
<appender-ref ref="error"/>
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</root>
|
</root>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
7
servers/boe-server-all/src/main/resources/smart-doc.json
Normal file
7
servers/boe-server-all/src/main/resources/smart-doc.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"outPath": "src/main/resources/apidoc",
|
||||||
|
"isStrict": false,
|
||||||
|
"ignoreEmptyTag": true,
|
||||||
|
"createDebugPage": true,
|
||||||
|
"allInOne": true
|
||||||
|
}
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>application-*.yml</include>
|
<include>application-${profileActive}.yml</include>
|
||||||
<include>application.yml</include>
|
<include>application.yml</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
# application-pro.yml
|
# application-pro.yml
|
||||||
spring:
|
spring:
|
||||||
|
profiles:
|
||||||
|
active: pro
|
||||||
redis:
|
redis:
|
||||||
database: 1
|
database: 3
|
||||||
host: 10.251.88.213
|
host: 10.251.88.213
|
||||||
password: qwert!W588
|
password: qwert!W588
|
||||||
port: 6379
|
port: 6379
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# application.yml
|
# application.yml
|
||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: @profileActive@
|
||||||
application:
|
application:
|
||||||
name: boe-server-basic
|
name: boe-server-basic
|
||||||
jackson:
|
jackson:
|
||||||
@@ -62,4 +62,4 @@ ok:
|
|||||||
|
|
||||||
# 设置logback.xml位置
|
# 设置logback.xml位置
|
||||||
logging:
|
logging:
|
||||||
config: classpath:log/logback-${spring.profiles.active}.xml
|
config: classpath:log/logback-@profileActive@.xml
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration debug="false" scan="false">
|
|
||||||
<springProperty scop="context" name="spring.application.name" source="spring.application.name" defaultValue=""/>
|
|
||||||
<property name="log.path" value="/home/logs/${spring.application.name}"/>
|
|
||||||
<!-- 彩色日志格式 -->
|
|
||||||
<property name="CONSOLE_LOG_PATTERN"
|
|
||||||
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
|
||||||
<!-- 彩色日志依赖的渲染类 -->
|
|
||||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
|
|
||||||
<conversionRule conversionWord="wex"
|
|
||||||
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
|
|
||||||
<conversionRule conversionWord="wEx"
|
|
||||||
converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
|
|
||||||
<!-- Console log output -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- Log file debug output -->
|
|
||||||
<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/debug.log</file>
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
|
||||||
<fileNamePattern>${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
|
||||||
<maxFileSize>50MB</maxFileSize>
|
|
||||||
<maxHistory>30</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- Log file error output -->
|
|
||||||
<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
|
||||||
<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
|
||||||
<maxFileSize>50MB</maxFileSize>
|
|
||||||
<maxHistory>30</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
|
||||||
<level>ERROR</level>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
|
|
||||||
<root level="WARN">
|
|
||||||
<appender-ref ref="debug"/>
|
|
||||||
<appender-ref ref="error"/>
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
||||||
Reference in New Issue
Block a user