[Solved] JAVA Error: org.springframework.beans.factory.BeanCreationException

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: