rev: TLOG与dynamictp相关配置更改
This commit is contained in:
2
wms_pro/hd/.idea/encodings.xml
generated
2
wms_pro/hd/.idea/encodings.xml
generated
@@ -3,5 +3,7 @@
|
|||||||
<component name="Encoding">
|
<component name="Encoding">
|
||||||
<file url="file://$PROJECT_DIR$/nladmin-system/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/nladmin-system/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/nladmin-system/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/nladmin-system/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -28,6 +28,13 @@
|
|||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara.dynamictp</groupId>
|
||||||
|
<artifactId>dynamic-tp-spring-boot-starter-adapter-webserver</artifactId>
|
||||||
|
<version>1.1.7</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>org.codehaus.groovy</groupId>
|
||||||
<artifactId>groovy-all</artifactId>
|
<artifactId>groovy-all</artifactId>
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
package org.nl;
|
package org.nl;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaIgnore;
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
|
import org.dromara.dynamictp.core.spring.EnableDynamicTp;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.nl.common.utils.SpringContextHolder;
|
|
||||||
import org.nl.common.websocket.heartSocket.clientSocket.HeartClientServer;
|
|
||||||
import org.springframework.beans.factory.BeanFactory;
|
|
||||||
import org.springframework.beans.factory.support.AbstractBeanFactory;
|
|
||||||
import org.springframework.boot.CommandLineRunner;
|
import org.springframework.boot.CommandLineRunner;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
@@ -14,14 +10,11 @@ import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactor
|
|||||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||||
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Import;
|
|
||||||
import org.springframework.scheduling.annotation.EnableAsync;
|
import org.springframework.scheduling.annotation.EnableAsync;
|
||||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开启审计功能 -> @EnableJpaAuditing
|
* 开启审计功能 -> @EnableJpaAuditing
|
||||||
* https://www.cnblogs.com/niceyoo/p/10908647.html
|
* https://www.cnblogs.com/niceyoo/p/10908647.html
|
||||||
@@ -37,6 +30,7 @@ import java.net.InetSocketAddress;
|
|||||||
@ServletComponentScan
|
@ServletComponentScan
|
||||||
@EnableTransactionManagement
|
@EnableTransactionManagement
|
||||||
@MapperScan("org.nl.**.mapper")
|
@MapperScan("org.nl.**.mapper")
|
||||||
|
@EnableDynamicTp
|
||||||
public class AppRun implements CommandLineRunner {
|
public class AppRun implements CommandLineRunner {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(AppRun.class, args);
|
SpringApplication.run(AppRun.class, args);
|
||||||
@@ -54,12 +48,12 @@ public class AppRun implements CommandLineRunner {
|
|||||||
// return new SpringContextHolder();
|
// return new SpringContextHolder();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@Bean
|
/*@Bean
|
||||||
public ServletWebServerFactory webServerFactory() {
|
public ServletWebServerFactory webServerFactory() {
|
||||||
TomcatServletWebServerFactory fa = new TomcatServletWebServerFactory();
|
TomcatServletWebServerFactory fa = new TomcatServletWebServerFactory();
|
||||||
fa.addConnectorCustomizers(connector -> connector.setProperty("relaxedQueryChars", "[]{}"));
|
fa.addConnectorCustomizers(connector -> connector.setProperty("relaxedQueryChars", "[]{}"));
|
||||||
return fa;
|
return fa;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 访问首页提示
|
* 访问首页提示
|
||||||
@@ -69,6 +63,11 @@ public class AppRun implements CommandLineRunner {
|
|||||||
@GetMapping("/")
|
@GetMapping("/")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public String index() {
|
public String index() {
|
||||||
|
try {
|
||||||
|
Thread.sleep(10000);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
return "Backend service started successfully";
|
return "Backend service started successfully";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,21 @@
|
|||||||
package org.nl.wms.system_manage.service.quartz.utils;
|
package org.nl.wms.system_manage.service.quartz.utils;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.yomahub.tlog.core.thread.TLogInheritableTask;
|
||||||
|
import lombok.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.common.utils.SpringContextHolder;
|
import org.nl.common.utils.SpringContextHolder;
|
||||||
import org.springframework.util.ReflectionUtils;
|
import org.springframework.util.ReflectionUtils;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.concurrent.Callable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 执行定时任务
|
* 执行定时任务
|
||||||
|
*
|
||||||
* @author /
|
* @author /
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class QuartzRunnable implements Callable {
|
public class QuartzRunnable extends TLogInheritableTask {
|
||||||
|
|
||||||
private final Object target;
|
private final Object target;
|
||||||
private final Method method;
|
private final Method method;
|
||||||
@@ -31,14 +33,15 @@ public class QuartzRunnable implements Callable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SneakyThrows
|
||||||
@Override
|
@Override
|
||||||
public Object call() throws Exception {
|
public void runTask() {
|
||||||
ReflectionUtils.makeAccessible(method);
|
ReflectionUtils.makeAccessible(method);
|
||||||
if (StrUtil.isNotEmpty(params)) {
|
if (StrUtil.isNotEmpty(params)) {
|
||||||
method.invoke(target, params);
|
method.invoke(target, params);
|
||||||
} else {
|
} else {
|
||||||
method.invoke(target);
|
method.invoke(target);
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
测试创建文件
|
|
||||||
测试修改
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
123123221322313
|
|
||||||
|
|
||||||
@@ -1,11 +1,6 @@
|
|||||||
server:
|
server:
|
||||||
port: 8012
|
port: 8012
|
||||||
max-http-header-size: 65536
|
max-http-header-size: 65536
|
||||||
tomcat:
|
|
||||||
accept-count: 300
|
|
||||||
threads:
|
|
||||||
max: 300
|
|
||||||
min-spare: 30
|
|
||||||
#配置数据源
|
#配置数据源
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
@@ -158,6 +153,7 @@ sa-token:
|
|||||||
# 配置 Cookie 作用域:根据二级域名实现sso登入如lms.sso.com;acs.sso.com
|
# 配置 Cookie 作用域:根据二级域名实现sso登入如lms.sso.com;acs.sso.com
|
||||||
domain:
|
domain:
|
||||||
is-read-cookie: false
|
is-read-cookie: false
|
||||||
|
is-print: false
|
||||||
schedulerFile: /Users/mima0000/Desktop/scheduler.xml
|
schedulerFile: /Users/mima0000/Desktop/scheduler.xml
|
||||||
lucene:
|
lucene:
|
||||||
index:
|
index:
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
server:
|
||||||
|
tomcat:
|
||||||
|
relaxed-query-chars: [ '|','{','}','[',']' ] #字符问题:https://blog.csdn.net/CanYue_Yi/article/details/109182577
|
||||||
|
relaxed-path-chars: [ '|','{','}','[',']' ] #字符问题: https://blog.csdn.net/weixin_41996632/article/details/90715118
|
||||||
spring:
|
spring:
|
||||||
freemarker:
|
freemarker:
|
||||||
check-template-location: false
|
check-template-location: false
|
||||||
@@ -9,6 +13,21 @@ spring:
|
|||||||
redis:
|
redis:
|
||||||
repositories:
|
repositories:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
dynamic:
|
||||||
|
tp:
|
||||||
|
enabled: true # 是否启用 dynamictp,默认true
|
||||||
|
enabledBanner: false # 是否启用 控制台banner,默认true
|
||||||
|
enabledCollect: true # 是否开启监控指标采集,默认true
|
||||||
|
collectorTypes: logging # 监控数据采集器类型(logging | micrometer | internal_logging),默认micrometer
|
||||||
|
logPath: d:\log\lms # 监控日志数据路径,默认 ${user.home}/logs,采集类型非logging不用配置
|
||||||
|
monitorInterval: 8
|
||||||
|
tomcatTp: # tomcat webserver 线程池配置
|
||||||
|
threadPoolAliasName: tomcat 线程池 # 线程池别名,可选
|
||||||
|
corePoolSize: 15
|
||||||
|
tryInterrupt: false
|
||||||
|
maximumPoolSize: 100
|
||||||
|
keepAliveTime: 60
|
||||||
|
runTimeout: 5000
|
||||||
task:
|
task:
|
||||||
pool:
|
pool:
|
||||||
# 核心线程池大小
|
# 核心线程池大小
|
||||||
@@ -91,3 +110,6 @@ pageheiper:
|
|||||||
supportMethodsArguments: true
|
supportMethodsArguments: true
|
||||||
pageSizeZero: false #pageSize=0 返回所有
|
pageSizeZero: false #pageSize=0 返回所有
|
||||||
params: count=countSgl
|
params: count=countSgl
|
||||||
|
tlog:
|
||||||
|
enable-invoke-time-print: true
|
||||||
|
pattern: "[$traceId]"
|
||||||
@@ -79,8 +79,8 @@
|
|||||||
<!--开发环境:打印控制台-->
|
<!--开发环境:打印控制台-->
|
||||||
<springProfile name="dev3">
|
<springProfile name="dev3">
|
||||||
<root level="info">
|
<root level="info">
|
||||||
<appender-ref ref="asyncLuceneAppender"/>
|
|
||||||
<appender-ref ref="CONSOLE"/>
|
<appender-ref ref="CONSOLE"/>
|
||||||
|
<appender-ref ref="asyncLuceneAppender"/>
|
||||||
</root>
|
</root>
|
||||||
<logger name="jdbc" level="ERROR" additivity="true">
|
<logger name="jdbc" level="ERROR" additivity="true">
|
||||||
<appender-ref ref="asyncFileAppender"/>
|
<appender-ref ref="asyncFileAppender"/>
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
123213213
|
|
||||||
Reference in New Issue
Block a user