SSM service注入報No matching bean of type [cn.zhuxin.ssm.mapper.ItemsMapperCustom] found for dependency: expected at least 1 bean which 檢查好幾遍 沒找到問題 希望大神幫看看
這個是專案目錄

dao的配置

WEB配置


service

controller

報錯資訊

求大神指點下 萬分感謝
uj5u.com熱心網友回復:

service
uj5u.com熱心網友回復:
ItemsMapperCustom加注解了沒?uj5u.com熱心網友回復:
ItemsMapperCustom這個用的動態代理 只有一個介面個mapper 要在介面上加@Controller嗎?
uj5u.com熱心網友回復:
不用,sqlMapConfig.xml怎么寫的?springmvc.xml第15行是jdbc.propertiesuj5u.com熱心網友回復:
在web.xml中配置org.springframework.web.context.ContextLoaderListener。。。。
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring/applicationContext-*.xml</param-value>
</context-param>
uj5u.com熱心網友回復:
在web.xml中配置org.springframework.web.context.ContextLoaderListener。。。。
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring/applicationContext-*.xml</param-value>
</context-param>
什么意思?
uj5u.com熱心網友回復:
5樓說你少了一個配置,uj5u.com熱心網友回復:

你先把這個修改了試試,不知道是不是這個也是有錯誤的。其他的
uj5u.com熱心網友回復:
是不是在spring組態檔少了這句<context:component-scan base-package=""></context:component-scan>,掃描使用注解的包
uj5u.com熱心網友回復:
你的applicationContext-dao.xml里,第一行<context:property-placeholder location="里邊jdbc寫成jabc了"/>
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/53744.html
標籤:Java EE
上一篇:求演算法
下一篇:redis例外JedisClusterMaxAttemptsException: No more cluster attempts left.
