2 Commits

Author SHA1 Message Date
疯狂的狮子Li
14091133c4 update 优化 删除监控无用配置代码(升级之后不需要了) 2025-08-11 14:05:57 +08:00
疯狂的狮子Li
3cc8b1767e update 优化 由spring自己初始化线程池 2025-08-11 10:28:14 +08:00
4 changed files with 7 additions and 31 deletions

View File

@@ -1,5 +1,6 @@
package org.dromara.modules.monitor;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -8,6 +9,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
*
* @author ruoyi
*/
@EnableAdminServer
@SpringBootApplication
public class RuoYiMonitorApplication {
public static void main(String[] args) {

View File

@@ -1,31 +0,0 @@
package org.dromara.modules.monitor.config;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration;
import org.springframework.boot.task.ThreadPoolTaskExecutorBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor;
/**
* springboot-admin server配置类
*
* @author Lion Li
*/
@Configuration
@EnableAdminServer
public class AdminServerConfig {
@Lazy
@Bean(name = TaskExecutionAutoConfiguration.APPLICATION_TASK_EXECUTOR_BEAN_NAME)
@ConditionalOnMissingBean(Executor.class)
public ThreadPoolTaskExecutor applicationTaskExecutor(ThreadPoolTaskExecutorBuilder builder) {
return builder.build();
}
}

View File

@@ -49,6 +49,8 @@ spring:
# 从 springboot 3.5 开始 spring自带线程池
# 不再需要 AsyncConfig与ThreadPoolConfig 可直接注入线程池使用
thread-name-prefix: async-
# 由spring自己初始化线程池
mode: force
# 资源信息
messages:
# 国际化资源文件路径

View File

@@ -11,3 +11,6 @@ spring:
discovery:
# seata 不具有健康检查的能力 防止报错排除掉
ignored-services: ruoyi-seata-server
# 忽略无用警告
thymeleaf:
check-template-location: false