update tlog 1.3.4 => 1.3.5 启用 tlog 自动配置
This commit is contained in:
parent
a39a98cda9
commit
8f8e796c77
22
pom.xml
22
pom.xml
@ -34,7 +34,7 @@
|
|||||||
<redisson.version>3.16.4</redisson.version>
|
<redisson.version>3.16.4</redisson.version>
|
||||||
<lock4j.version>2.2.1</lock4j.version>
|
<lock4j.version>2.2.1</lock4j.version>
|
||||||
<dynamic-ds.version>3.4.1</dynamic-ds.version>
|
<dynamic-ds.version>3.4.1</dynamic-ds.version>
|
||||||
<tlog.version>1.3.4</tlog.version>
|
<tlog.version>1.3.5</tlog.version>
|
||||||
<xxl-job.version>2.3.0</xxl-job.version>
|
<xxl-job.version>2.3.0</xxl-job.version>
|
||||||
|
|
||||||
<!-- jdk11 缺失依赖 jaxb-->
|
<!-- jdk11 缺失依赖 jaxb-->
|
||||||
@ -203,29 +203,13 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.yomahub</groupId>
|
<groupId>com.yomahub</groupId>
|
||||||
<artifactId>tlog-spring-boot-configuration</artifactId>
|
<artifactId>tlog-web-spring-boot-starter</artifactId>
|
||||||
<version>${tlog.version}</version>
|
<version>${tlog.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.yomahub</groupId>
|
<groupId>com.yomahub</groupId>
|
||||||
<artifactId>tlog-webroot</artifactId>
|
<artifactId>tlog-xxljob-spring-boot-starter</artifactId>
|
||||||
<version>${tlog.version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>javassist</artifactId>
|
|
||||||
<groupId>org.javassist</groupId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>guava</artifactId>
|
|
||||||
<groupId>com.google.guava</groupId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.yomahub</groupId>
|
|
||||||
<artifactId>tlog-xxl-job</artifactId>
|
|
||||||
<version>${tlog.version}</version>
|
<version>${tlog.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@ -140,16 +140,6 @@
|
|||||||
<artifactId>lock4j-redisson-spring-boot-starter</artifactId>
|
<artifactId>lock4j-redisson-spring-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.yomahub</groupId>
|
|
||||||
<artifactId>tlog-spring-boot-configuration</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.yomahub</groupId>
|
|
||||||
<artifactId>tlog-webroot</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -63,6 +63,11 @@
|
|||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.yomahub</groupId>
|
||||||
|
<artifactId>tlog-web-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -35,14 +35,14 @@ public class PlusWebInvokeTimeInterceptor extends AbsTLogWebHandlerMethodInterce
|
|||||||
// 打印请求参数
|
// 打印请求参数
|
||||||
if (isJsonRequest(request)) {
|
if (isJsonRequest(request)) {
|
||||||
String jsonParam = new RequestWrapper(request).getBodyString();
|
String jsonParam = new RequestWrapper(request).getBodyString();
|
||||||
log.info("[PLUS]开始请求 => URL[{}],参数类型[json],参数:[{}]", url, jsonParam);
|
log.debug("[PLUS]开始请求 => URL[{}],参数类型[json],参数:[{}]", url, jsonParam);
|
||||||
} else {
|
} else {
|
||||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||||
if (MapUtil.isNotEmpty(parameterMap)) {
|
if (MapUtil.isNotEmpty(parameterMap)) {
|
||||||
String parameters = JsonUtils.toJsonString(parameterMap);
|
String parameters = JsonUtils.toJsonString(parameterMap);
|
||||||
log.info("[PLUS]开始请求 => URL[{}],参数类型[param],参数:[{}]", url, parameters);
|
log.debug("[PLUS]开始请求 => URL[{}],参数类型[param],参数:[{}]", url, parameters);
|
||||||
} else {
|
} else {
|
||||||
log.info("[PLUS]开始请求 => URL[{}],无参数", url);
|
log.debug("[PLUS]开始请求 => URL[{}],无参数", url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ public class PlusWebInvokeTimeInterceptor extends AbsTLogWebHandlerMethodInterce
|
|||||||
if (TLogContext.enableInvokeTimePrint()) {
|
if (TLogContext.enableInvokeTimePrint()) {
|
||||||
StopWatch stopWatch = invokeTimeTL.get();
|
StopWatch stopWatch = invokeTimeTL.get();
|
||||||
stopWatch.stop();
|
stopWatch.stop();
|
||||||
log.info("[PLUS]结束请求 => URL[{}],耗时:[{}]毫秒", request.getMethod() + " " + request.getRequestURI(), stopWatch.getTime());
|
log.debug("[PLUS]结束请求 => URL[{}],耗时:[{}]毫秒", request.getMethod() + " " + request.getRequestURI(), stopWatch.getTime());
|
||||||
invokeTimeTL.remove();
|
invokeTimeTL.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,8 @@
|
|||||||
package com.ruoyi.framework.config;
|
package com.ruoyi.framework.config;
|
||||||
|
|
||||||
import com.yomahub.tlog.core.aop.AspectLogAop;
|
import com.yomahub.tlog.springboot.TLogWebAutoConfiguration;
|
||||||
import com.yomahub.tlog.spring.TLogPropertyInit;
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||||
import com.yomahub.tlog.spring.TLogSpringAware;
|
|
||||||
import com.yomahub.tlog.springboot.property.TLogProperty;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Import;
|
|
||||||
import org.springframework.core.annotation.Order;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整合 TLog 框架配置
|
* 整合 TLog 框架配置
|
||||||
@ -15,29 +10,9 @@ import org.springframework.core.annotation.Order;
|
|||||||
* @author Lion Li
|
* @author Lion Li
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*/
|
*/
|
||||||
@Order(-999)
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@Import(TLogProperty.class)
|
// 排除 web 自动配置 自定义实现
|
||||||
|
@EnableAutoConfiguration(exclude = TLogWebAutoConfiguration.class)
|
||||||
public class TLogConfig {
|
public class TLogConfig {
|
||||||
|
|
||||||
@Bean
|
|
||||||
public TLogPropertyInit tLogPropertyInit(TLogProperty tLogProperty) {
|
|
||||||
TLogPropertyInit tLogPropertyInit = new TLogPropertyInit();
|
|
||||||
tLogPropertyInit.setPattern(tLogProperty.getPattern());
|
|
||||||
tLogPropertyInit.setEnableInvokeTimePrint(tLogProperty.enableInvokeTimePrint());
|
|
||||||
tLogPropertyInit.setIdGenerator(tLogProperty.getIdGenerator());
|
|
||||||
tLogPropertyInit.setMdcEnable(tLogProperty.getMdcEnable());
|
|
||||||
return tLogPropertyInit;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public TLogSpringAware tLogSpringAware(){
|
|
||||||
return new TLogSpringAware();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public AspectLogAop aspectLogAop() {
|
|
||||||
return new AspectLogAop();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.yomahub</groupId>
|
<groupId>com.yomahub</groupId>
|
||||||
<artifactId>tlog-xxl-job</artifactId>
|
<artifactId>tlog-xxljob-spring-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -2,7 +2,6 @@ package com.ruoyi.job.config;
|
|||||||
|
|
||||||
import com.ruoyi.job.config.properties.XxlJobProperties;
|
import com.ruoyi.job.config.properties.XxlJobProperties;
|
||||||
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
|
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
|
||||||
import com.yomahub.tlog.springboot.lifecircle.TLogXxljobEnhanceInit;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
@ -40,9 +39,4 @@ public class XxlJobConfig {
|
|||||||
return xxlJobSpringExecutor;
|
return xxlJobSpringExecutor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
}
|
||||||
public TLogXxljobEnhanceInit tLogXxljobEnhanceInit(){
|
|
||||||
return new TLogXxljobEnhanceInit();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user