First, project start, login error
Org.springframework.beans.factory.BeanCreationException:Error creating Bean with Name ' Shirofilter ' defined in class PA TH resource [Spring-mvc.xml]: Cannot resolve reference to beans ' securitymanager ' while setting bean property ' Securitymana Ger '; Nested exception is org.springframework.beans.factory.BeanCreationException:Error creating beans with Name ' SecurityManager ' defined in class path resource [Spring-mvc.xml]: Cannot resolve reference-bean ' sessionmanager ' while Setting bean property ' SessionManager '; Nested exception is org.springframework.beans.factory.BeanCreationException:Error creating beans with Name ' SessionManager ' defined in class path resource [Spring-mvc.xml]: Cannot resolve reference-bean ' ecachemanager ' while SE Tting Bean property ' CacheManager '; Nested exception is org.springframework.beans.factory.BeanCreationException:Error creating beans with Name ' Ecachemanager ' defined in class path resource [Spring-mvc.xml]: Initialization of Bean failed; Nested EXCEPtion is org.springframework.beans.FatalBeanException:Error initializing bean [Ecachemanager]; Nested exception is org.apache.shiro.cache.CacheException:net.sf.ehcache.CacheException:Another unnamed CacheManager already exists in the same VM. Provide unique names for each cachemanager in the config or do one of the following:
1. Use one of the cachemanager.create () static factory methods to reuse same CacheManager with same name or create one if Necessary
2. Shutdown the earlier CacheManager before creating new one with same name.
Second, the solution:
<ehcache.version>2.4.8</ehcache.version>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>${ehcache.version}</version>
</dependency>
Resolve Spring+shiro CacheManager Login Error