Recently changed work and the new project used spring almost everywhere,logged something while studying it.I'll continue write something here additional.
1 First one that happened yesterday,i aim to create a static ThreadPool and config the thread pool size in the config file and use @Value to adjust auto config thread pool.But i failed,seems spring don't support annotate for static field,also confirmed from my technical manager.
He suggested me to split the threadPool service from that class,and clean the responsibilities for each class,we can built that single class and init the thread pool while container started.
So this issue kind resolved.
在使用Spring框架的项目中,尝试通过注解配置静态线程池大小遇到失败,经技术经理建议,将线程池服务从类中分离,并为每个类清晰职责,实现了初始化线程池的目标。
1218

被折叠的 条评论
为什么被折叠?



