Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的用例:我想存储一个标志,并且这个标志应该一直存在,直到应用程序重新启动。例如,如果应用程序崩溃,我希望重置该标志。
你认为如果与存在一起使用SimpleMemoryObjectStore会persistent起作用false吗?
SimpleMemoryObjectStore
persistent
false
SimpleMemoryObjectStore 默认不是持久化的:
@Override 26 public boolean More ...isPersistent() 27 { 28 return false; 29 }
因此,如果服务器重新启动,该值将丢失。