高手进下啊org.spring程序高手秘笈fram...

&>&&>&&>&&>&org.springframework.asm-3.0.1.RELEASE-A.jar
org.springframework.asm-3.0.1.RELEASE-A.jar
上传大小:52KB
rg.springframework.asm-3.0.1.RELEASE-A.jar
综合评分:4.7(11位用户评分)
所需积分:0
下载次数:305
审核通过送C币
创建者:qw
创建者:zhangguo5
课程推荐相关知识库
上传者其他资源上传者专辑
开发技术热门标签
VIP会员动态
您因违反CSDN下载频道规则而被锁定帐户,如有疑问,请联络:!
android服务器底层网络模块的设计方法
所需积分:0
剩余积分:720
您当前C币:0
可兑换下载积分:0
兑换下载分:
兑换失败,您当前C币不够,请先充值C币
消耗C币:0
你当前的下载分为234。
org.springframework.asm-3.0.1.RELEASE-A.jar
会员到期时间:
剩余下载次数:
你还不是VIP会员
开通VIP会员权限,免积分下载
你下载资源过于频繁,请输入验证码
您因违反CSDN下载频道规则而被锁定帐户,如有疑问,请联络:!
若举报审核通过,可奖励20下载分
被举报人:
举报的资源分:
请选择类型
资源无法下载
资源无法使用
标题与实际内容不符
含有危害国家安全内容
含有反动***等内容
含广告内容
版权问题,侵犯个人或公司的版权
*详细原因:org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching解决方案 - 远去的渡口 - ITeye技术网站
博客分类:
今天写一个接口,所有的都写完了后来测试。整个项目是用spring-mvc的框架,使用ibatis做数据库层操作。
用jetty:run启动时老报错。
指向的是我的一个dao类bean找不到定义,我明明写了
@Autowired private ApiCouponPresentDao apiCouponPresentD 注入代码的呀,一直没想起来哪里有错。
错误信息是:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'apiWechatService': Injection of autowired nested exception is
org.springframework.beans.factory.BeanCreationException: Could not autowire field: private
com.tongcard.api.services.ApiCouponService
com.tongcard.api.services.impl.ApiWechatServiceImpl.apiCouponS nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'apiCouponService': Injection of autowired nested exception is
org.springframework.beans.factory.BeanCreationException: Could not autowire field: private
com.tongcard.api.daos.ApiCouponPresentDao
com.tongcard.api.services.impl.ApiCouponServiceImpl.apiCouponPresentD nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type
[com.tongcard.api.daos.ApiCouponPresentDao] found for dependency: expected at least 1 bean
which qualifies as autowire candidate for this dependency. Dependency annotations:
{@org.springframework.beans.factory.annotation.Autowired(required=true)}
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProces
sPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean
(AbstractAutowireCapableBeanFactory.java:1106)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean
(AbstractAutowireCapableBeanFactory.java:517)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject
(AbstractBeanFactory.java:294)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean
(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:193)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton
s(DefaultListableBeanFactory.java:609)
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitializati
on(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh
(AbstractApplicationContext.java:469)
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext
(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext
(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized
(ContextLoaderListener.java:111)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized
(ContextHandler.java:672)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized
(ServletContextHandler.java:403)
at org.eclipse.jetty.server.handler.ContextHandler.startContext
(ContextHandler.java:664)
后来查找其他的类似引用的bean,搜索后发现在spring-biz.xml里面有配置,而这个类是我新加的,我忘记写上配置了。
于是在配置文件中加入这个新的dao的定义后,再启动就正常了。spring-mvc使用还不熟,不过这一点都忘记了的确不应该,记录一下。
浏览 15774
远去的渡口
浏览: 315140 次
来自: 上海转北京
又仔细看了下,如果设置周日为每周的第一天,应该是正确的,如果把 ...
开始日期结束日期只用博 ...
郁闷了半天,看了文章才知道连错库了!!想揍自己一顿
太感谢了,
幸亏我看了十分钟就来搜了,感谢楼主。温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
这个错误比较容易犯,下面是从网上收集过来的资料:总结一下,有可能由以下原因造成:1.如果你使用eclipse创建的工程是class和src分开的,那么资源属性文件一定要放在src目录以内。2.属性文件名的写法:messages_zh_CN.properties& (中文)messages_en_US.properties&(英文)3.配置messageSource这个bean(注意:一定是messageSource不是messageResource&,这是Spring规定的)&bean id="messageSource"&&&&&&&&&& class="org.springframework.context.support.ResourceBundleMessageSource"&&&&&&&& &description&只能命名成messageSource&/description&&&&&&&& &property name="basenames"&&&&&&&& &&list&&&&&&&& && &value&messages&/value&(这里是国际化资源名不需要_zh_CN)& &&&&&&&& &&/list&&&&&&&&& &/property&&&&& &/bean&引文来源&&
阅读(597)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
在LOFTER的更多文章
loftPermalink:'',
id:'fks_',
blogTitle:'org.springframework.context.NoSuchMessageException:错误',
blogAbstract:'\t我犯这个错误主要是因为:我把国际化的文件放在src的子包下,应该直接放在src的包下.这个错误比较容易犯,下面是从网上收集过来的资料:总结一下,有可能由以下原因造成:1.如果你使用eclipse创建的工程是class和src分开的,那么资源属性文件一定要放在src目录以内。',
blogTag:'spring,s2sh',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:7,
publishTime:8,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
hmcon:'1',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}

参考资料

 

随机推荐