在我的项目中,我遇到了问题;我有很多场景需要支持多状态配置,比如需要定义创建订单状态机,还需要定义创建商品状态;那么有人可以告诉我如何使用弹簧状态机吗?
我已经使用@EnableStateMachineFactory
并定义了
@Configuration
@EnableStateMachineFactory
@SuppressWarnings("all")
public class OrderHoldConfiguration extends EnumStateMachineConfigurerAdapter<HoldState, HoldEvent> {
...
}
@Configuration
@EnableStateMachineFactory
public class JsdConfiguration extends EnumStateMachineConfigurerAdapter<BizState, BizEvent> {
...
}
但它不起作用,我应该使用哪种方式?