摘要
状态机是一种表示有限状态以及在这些状态之间的转移和动作等行为的模型。可以通过发送事件,或者请求当前状态来与状态机进行交互。Spring StateMachine是Spring框架提供的一款在Web应用中利用有限状态机轻量级的框架,它可以帮助开发者简化状态机的开发过程,提高代码安全性和开发效率。以电商系统的订单状态管理为例,通过Spring StateMachine框架的使用,对状态机设计模式进行应用研究。
State Machine is a model that represents finite states and transitions and actions between them.A State Machine can be interacted by send-ing an event or requesting the current state.Spring StateMachine is a lightweight framework provided by the Spring framework to leverage finite-state machines in Web applications.It can help developers simplify the development process of state machines and improve code se-curity and development efficiency.Takes order status management of e-commerce system as an example,studies the application of state machine design mode through the use of Spring StateMachine framework.
作者
吴德
许凡
WU De;XU Fan(School of Computer Science and Engineering,Sanjiang University,Nanjing 210012)
出处
《现代计算机》
2018年第20期89-92,共4页
Modern Computer
基金
江苏省现代教育技术课题(No.2017-R-59217)