1. Error type
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.interceptor.CacheInterceptor#0' : Cannot resolve reference to bean 'cacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cacheManager' available
Screenshot of error type:
2. Error reason
There are many reasons for such problems. I can only talk about the reasons for the above mistakes
The problem is In the applicationcontext.xml configuration file under the Resources folder
As shown in the figure above, one of the mistakes that beginners are prone to make
3. Solution
Change
xmlns:mvc="http://www.springframework.org/schema/cache"
to
xmlns:mvc="http://www.springframework.org/schema/mvc"
I hope I can help you!
Similar Posts:
- The prefix “mvc” for element “mvc:annotation-driven” is not bound Error
- How to Solve the login error of Spring + Shiro CacheManager
- mybatis: Property ‘configuration’ and ‘configLocation’ can not specified with together
- Cannot resolve reference to bean ‘entityManagerFactory’ while setting constructor argument
- Spring Custome schema Loading Error: White spaces are required between publicId and systemId.
- Unit test reports an error nosuchbeandefinitionexception
- Cannot find the declaration of element ‘beans’
- Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userDaoImpl’ defined in file
- [Solved] Springboot startup error: org.springframework.beans.factory.unsatisfieddependenceexception…
- factory.NoSuchBeanDefinitionException: No qualifying bean of type