Cache configuration in ACEGI

xiaoxiao2021-03-06  40

By reading the source code of Acegi, it is more experienced to "interface" design to expand huge flexibility. In the bean configuration, there are the following: < / Property> This UserCache, AceGi gives a default EHCACHE implementation, if you don't have this property, default Using nullusercache, after logging in, every time you enter a URL, the system will access a database via DAO to get new UserDetails, and IBATI is a mapping in my own system, and ibatis has their own configuration Cache Manager, according to The Demo's log information is determined. After configuring the cache mode for iBATIS in user.xml, it is not necessary to inject the userCache property to the above-described bean, and the cache information will be cleared at the same time when modifying user information. This is different from our usual design ideas, and we generally design, after a user logs in, put its user info bean into the session, take the same, this BIG BEAN includes related details and role collections . Acegi's "certification" and "authorization" are separated, it only needs to use the object when the object needs to be used in the session. Thank Spring, thanks to Acegi.

转载请注明原文地址:https://www.9cbs.com/read-53724.html

New Post(0)