Is it possible to autowire a Thread class in spring like controller, Service? If yes what annotation shall I use to autowire such a class?
Depending on what you are doing, I would consider using TaskExecutors instead of directly creating threads. This way thread lifecycle, pooling etc. is managed through the TaskExecutor.
See http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/scheduling.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With