简体   繁体   English

会话范围弹簧状态机

[英]Session scope spring statemachine

I am developing a big eCommerce application, and i think this project may be a perfect fit for the checkout process. 我正在开发一个大型电子商务应用程序,我认为该项目可能非常适合结帐流程。 i just read the documentation but still have some little questions... 我只是阅读了文档,但是仍然有一些小问题...

1- Can i have StateMachine created and injected in session scope? 1-我可以在会话范围内创建并注入StateMachine吗? i think theoretically this can be done, but is it ok to have a stateMachine instance per session or is this overkill? 我认为理论上可以做到这一点,但是每个会话都有一个stateMachine实例还是可以的?

2- Can I persist the state to the session? 2-我可以将状态保留到会话中吗? How nice StateMachine plays with SpringSession? StateMachine如何与SpringSession一起玩? can the state persisted or serialized to Redis? 状态可以持久化还是序列化为Redis?

What is best practices to effectively use spring statemachine in this case? 在这种情况下,有效使用弹簧状态机的最佳实践是什么?

Thanks 谢谢

Unfortunately I have to say no to your questions. 不幸的是,我不得不对你的问题说不。 Session scope, possibly yes, in theory, but because I haven't tried, answer is only yes in theoretical level. 从理论上讲,会话范围可能是肯定的,但是由于我还没有尝试过,因此在理论上答案是肯定的。 But having said that these are a very good questions indeed. 不过话说回来,这是一个非常好的问题,确实如此。

We're getting into 1.0.0.RELEASE next week and after that we open project for new features and these are actually something I've played in my head what comes for the roadmap. 下周我们将进入1.0.0.RELEASE ,然后我们打开新功能的项目,这些实际上是我脑海中所想的。 I created issues gh-110 , gh-111 and gh-112 to track these. 我创建了问题gh-110gh-111gh-112来跟踪这些问题。

Main focus for Spring Statemachine 1.1.x will be around Spring Security and we can throw in some love for Spring Session and Scopes as much as we can. Spring Statemachine 1.1.x主要焦点将是Spring Security ,我们可以尽可能多地喜欢Spring SessionScopes All these are actually highly related to each others. 实际上,所有这些都是高度相关的。

While this may not help you in any means right now, feel free to create new github tickets for stuff you need/want. 尽管现在这可能无法以任何方式帮助您,但是请随时为您需要/想要的东西创建新的github票证。 Project is highly driven by stuff users are requesting. 项目受到用户要求的高度驱动。 So this is a good moment to raise your voice and speak up! 因此,这是个提高声音并说出来的好时机!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM