Change TaskExecutor bean name

- Now using stateMachineTaskExecutor instead of taskExecutor
  so that it's easier to use custom executor and not to
  collide with bean created i.e. scheduling.
- Fixes #83
This commit is contained in:
Janne Valkealahti
2015-08-09 09:51:23 +01:00
parent ab2277b3f7
commit 05f69070d8
7 changed files with 174 additions and 8 deletions

View File

@@ -27,6 +27,7 @@ import org.springframework.core.task.TaskExecutor;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.shell.Bootstrap;
import org.springframework.statemachine.StateContext;
import org.springframework.statemachine.StateMachineSystemConstants;
import org.springframework.statemachine.action.Action;
import org.springframework.statemachine.annotation.OnTransition;
import org.springframework.statemachine.config.EnableStateMachine;
@@ -184,7 +185,7 @@ public class Application {
}
//tag::snippetAE[]
@Bean
@Bean(name = StateMachineSystemConstants.TASK_EXECUTOR_BEAN_NAME)
public TaskExecutor taskExecutor() {
ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();
taskExecutor.setCorePoolSize(5);