記一次idea構建springmvc報錯:No bean named 'cacheManager' available
第一次在idea中構建springmvc總是報錯:
後面發現原因竟然是idea的自動提示功能太強大造成的弊端!!!
這裡主要是因為我的spring-mvc.xml配置檔案中由於IDEA自動配置了cache,但配置檔案中又沒有指定快取的空間,JVM虛擬機器中也有個cacheManage,這就導致spring進行bean管理時掃描到兩個cache Manage 衝突導致都不能正常載入,報錯。
我一開始錯誤的spring-mvc.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/cache"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/cache
http://www.springframework.org/schema/cache/spring-cache.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!--使用註解來進行請求對映 -->
<mvc:annotation-driven/>
</beans>
錯誤地方:
修改後的spring-mvc.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<!--使用註解來進行請求對映 -->
<mvc:annotation-driven/>
</beans>
相關文章
- 使用Idea構建springmvc框架,出現no bean named ‘cacheManager’ is defined 錯誤。IdeaSpringMVC框架Bean
- idea maven搭建spring報錯:No bean named 'xxx' availableIdeaMavenSpringBeanAI
- No Bean named 'Xxx' available 異常報錯BeanAI
- Maven專案報錯:No bean named 'xxxxxx' availableMavenBeanAI
- Spring:錯誤No bean named 'xxxxxxx' availableSpringBeanAI
- spring中No bean named xxx available錯誤SpringBeanAI
- No bean named ''XXX“ availableBeanAI
- No bean named BookServiceImpl availableBeanAI
- No bean named 'cacheManager' availablej 異常解決BeanAI
- Caused by:.NoSuchBeanDefinitionException: No bean named 'userInfoServiceImpl' availableBeanExceptionAI
- 使用@Service註解出現No bean named 'xxxx' available]錯誤BeanAI
- SpringBoot 學習之 No bean named ‘xxx’ availableSpring BootBeanAI
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'aaaa' availableSpringFrameworkBeanExceptionAI
- spring-mybatis整合:NoSuchBeanDefinitionException: No bean named 'xxx.class' availableSpringMyBatisBeanExceptionAI
- Spring中出現:No bean named 'XXX' available問題解決SpringBeanAI
- 報錯:org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xxx'is definedSpringFrameworkBeanException
- spring配置檔案中配置了,但找不到Bean , 啟動不報錯,執行報錯No bean namedSpringBean
- 程式碼改造引發的NoSuchBeanDefinitionException:no bean named 'XXXX' available問題解決方案BeanExceptionAI
- eclipse用Maven構建SpringMVC環境報錯找不到springmvc包下的Dispatcher類EclipseMavenSpringMVC
- No bean named 'xxx' is defined錯誤,原因及解決方案Bean
- 關於idea中使用註解開發springmvc 500報錯IdeaSpringMVC
- spring getBean(String) No bean named '' is definedSpringBean
- Linux:Python報錯:No module named MySQLdbLinuxPythonMySql
- 記錄一次Git報錯Git
- SpringMVC錯誤記錄SpringMVC
- 記一次Docker構建失敗Docker
- SpringMVC---IDEA 搭建SpringMVC工程SpringMVCIdea
- 記錄安裝conda install Python庫時報No module named ‘tensorflow‘錯誤Python
- 【ERROR】su user報'This account is currently not available'錯誤 for linuxErrorAILinux
- Linux yum安裝httpd報錯 No package httpd available ?LinuxhttpdPackageAI
- 記錄一次定時器報錯定時器
- 使用idea搭建springMVCIdeaSpringMVC
- 用putty連線AWS,報錯“No supported authentication methods available"AI
- ADS報錯:Sorry, but the license for the following library is not available: "System Model Library"AI
- spring+springmvc+mybatis構建系統SpringMVCMyBatis
- 記一次 打包報錯:Keystore was tampered with, or password was incorrect
- 啟動uwsgi報錯ImportError: No module named, unable to load appImportErrorAPP
- No qualifying bean of type 'javax.sql.DataSource' available: expected at least 1BeanJavaSQLAIAST