Comments (4)
你的问题是通过@bean方式创建线程池并且通过@Autowired方式使用并不会被监控和动态配置吧?如果这样的话可以参考下正确的使用方式:
public static void main(String[] args) {
DtpExecutor dtpExecutor = DtpRegistry.getExecutor("dynamic-tp-test-1");
dtpExecutor.execute(() -> System.out.println("test"));
}
@bean方式创建的线程池会被配置文件覆盖
from dynamic-tp.
目前是这样的,框架自己定义了个容器存储通过配置文件创建的Executor对象,没有注册到spring容器中,需要通过DtpRegistry.getExecutor("dynamic-tp-test-1")这样获取,当然也可以注册到spring中,通过依赖注入使用,后续可以考虑加上
from dynamic-tp.
目前是这样的,框架自己定义了个容器存储通过配置文件创建的Executor对象,没有注册到spring容器中,需要通过DtpRegistry.getExecutor("dynamic-tp-test-1")这样获取,当然也可以注册到spring中,通过依赖注入使用,后续可以考虑加上
好的,谢谢解答
from dynamic-tp.
目前是这样的,框架自己定义了个容器存储通过配置文件创建的Executor对象,没有注册到spring容器中,需要通过DtpRegistry.getExecutor("dynamic-tp-test-1")这样获取,当然也可以注册到spring中,通过依赖注入使用,后续可以考虑加上
好的,谢谢解答
已支持依赖注入方式使用
from dynamic-tp.
Related Issues (20)
- 当任务执行执行超时时尝试中断线程
- undertow线程池管理报java.lang.VerifyError: Cannot inherit from final class异常 HOT 4
- 完善spring-configuration-metadata.json
- dubbo线程池初始化报错:class java.lang.String cannot be cast to class java.lang.Integer HOT 1
- bug: spring boot3接入 grpc线程池适配,影响了 grpc client 调用其他应用
- Optimized ThreadPoolBuilder code
- 简化消息通知Webhook
- 配置了企业微信推送,邮箱推送。但是无法收到推送消息 HOT 10
- 告警时traceId错乱问题
- dubbo 2.7.5以下的版本动态线程池不生效 HOT 1
- 仅配置了线程池,未在代码中使用就收到了告警通知 HOT 3
- 内存泄漏:默认配置下 DtpExecutor 在 AbortPolicy 拒绝策略下,拒绝时产生内存泄露 HOT 1
- 飞书告警报错 HOT 2
- 1.1.6.1版本和Skywalking线程池插件使用内存溢出 HOT 5
- 引入 rabbitmq adapter 后,使用 @RabbitListener 等注解预先定义好监听后,在项目启动后,再使用 RabbitListenerEndpointRegistry 注册监听时,出现 [java.util.concurrent.RejectedExecutionException] HOT 2
- 大佬们可以提供下grafana监控模版json或者id吗 HOT 2
- 在低版本rocketMQ里没有getAsyncSenderExecutor方法导致NoSuchMethodError
- 配置了任务包装器并且使用NamedRunnable.of包装线程,导致设置runnable name为空
- 引入dynamic
- question 引入dynamic启动失败 报 Invalid property 'executors[0].taskWrapperNames[1]' of bean class [org.dromara.dynamictp.common.properties.DtpProperties] HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamic-tp.