1 Answer
1

It would be better to separate business logic (the code that depends on your services) from the infrastructure code that manages threads.

For example, you can declare a bean that implements Runnable for your business logic and then use it when you need to start a Thread.

However, starting Threads manually is not a good practice as well. It would be better to use thread pools instead. Actually, Spring provides some built-in support for thread pools and asynchronous execution, so that you can leverage it, see 25. Task Execution and Scheduling.