27. Spring Boot Support

Auto-configuration module spring-statemachine-boot contains all integration logic with Spring Boot providing functionality i.e. for auto-config and actuators. All what is needed is to have State Machine as part of a boot application together with this library.

27.1 Monitoring and Tracing

BootStateMachineMonitor is created automatically and associated with a state machine. This BootStateMachineMonitor will hook into Boot’s CounterService, GaugeService and TraceRepository if available. Optionally this auto-configuration can be disabled by setting key spring.statemachine.monitor.enabled to false. Use of this auto-config is shown in sample Chapter 49, Monitoring.

27.2 Repository Config

Spring Data Repositories and Entity class scanning is auto-configured automatically for Chapter 32, Repository Config Support if needed classes are found from a classpath.

Currently supported configs are configured for JPA, Redis and MongoDB. Repository auto-configuration can be disabled using a properties spring.statemachine.data.jpa.repositories.enabled, spring.statemachine.data.redis.repositories.enabled and spring.statemachine.data.mongo.repositories.enabled respectively.