NutzCN Logo
问答 请问下这是怎么回事?
发布于 3179天前 作者 qq_45a5bd51 3224 次浏览 复制 上一个帖子 下一个帖子
标签:

2016-03-03 15:20:08,416 DEBUG [org.nutz.mvc.impl.UrlMappingImpl] - Found mapping for [GET] path=/test : IndexKpiController.test(IndexKpiController.java:38)
2016-03-03 15:20:08,419 DEBUG [org.nutz.ioc.impl.NutIoc] - Get 'indexKpiController'<class com.annet.mvc.controllers.IndexKpiController>
2016-03-03 15:20:08,419 DEBUG [org.nutz.ioc.impl.NutIoc] - >> Load definition name=indexKpiController
2016-03-03 15:20:08,419 DEBUG [org.nutz.ioc.loader.combo.ComboIocLoader] - Found IocObject(indexKpiController) in IocLoader(AnnotationIocLoader@1220171716)
2016-03-03 15:20:08,419 DEBUG [org.nutz.ioc.impl.NutIoc] - >> Make...'indexKpiController'<class com.annet.mvc.controllers.IndexKpiController>
2016-03-03 15:20:08,420 DEBUG [org.nutz.ioc.aop.impl.DefaultMirrorFactory] - Load class com.annet.mvc.controllers.IndexKpiController without AOP
2016-03-03 15:20:08,420 DEBUG [org.nutz.ioc.impl.ScopeContext] - Save object 'indexKpiController' to [app]
2016-03-03 15:20:08,422 DEBUG [org.nutz.ioc.loader.map.MapLoader] - Loading define for name=dataSource
2016-03-03 15:20:08,423 DEBUG [org.nutz.ioc.loader.combo.ComboIocLoader] - Found IocObject(dataSource) in IocLoader(JsonLoader@1879681808)
2016-03-03 15:20:08,423 DEBUG [org.nutz.ioc.loader.map.MapLoader] - Loading define for name=dao
2016-03-03 15:20:08,424 DEBUG [org.nutz.ioc.loader.combo.ComboIocLoader] - Found IocObject(dao) in IocLoader(JsonLoader@1879681808)
2016-03-03 15:20:08,424 DEBUG [org.nutz.ioc.loader.map.MapLoader] - Loading define for name=conf
2016-03-03 15:20:08,424 DEBUG [org.nutz.ioc.loader.combo.ComboIocLoader] - Found IocObject(conf) in IocLoader(JsonLoader@1879681808)
2016-03-03 15:20:08,480 DEBUG [org.nutz.ioc.loader.combo.ComboIocLoader] - Found IocObject(indexKpiController) in IocLoader(AnnotationIocLoader@1220171716)
2016-03-03 15:20:08,480 DEBUG [org.nutz.ioc.loader.combo.ComboIocLoader] - Found IocObject(userInfoController) in IocLoader(AnnotationIocLoader@1220171716)
2016-03-03 15:20:08,480 DEBUG [org.nutz.ioc.loader.combo.ComboIocLoader] - Found IocObject(BaseDataService) in IocLoader(AnnotationIocLoader@1220171716)
2016-03-03 15:20:08,481 DEBUG [org.nutz.ioc.loader.map.MapLoader] - Loading define for name=txREPEATABLE_READ
2016-03-03 15:20:08,482 DEBUG [org.nutz.ioc.loader.combo.ComboIocLoader] - Found IocObject(txREPEATABLE_READ) in IocLoader(TransIocLoader@2144340564)
2016-03-03 15:20:08,483 DEBUG [org.nutz.ioc.loader.map.MapLoader] - Loading define for name=txREAD_COMMITTED
2016-03-03 15:20:08,483 DEBUG [org.nutz.ioc.loader.combo.ComboIocLoader] - Found IocObject(txREAD_COMMITTED) in IocLoader(TransIocLoader@2144340564)
2016-03-03 15:20:08,483 DEBUG [org.nutz.ioc.loader.map.MapLoader] - Loading define for name=txNONE
2016-03-03 15:20:08,484 DEBUG [org.nutz.ioc.loader.combo.ComboIocLoader] - Found IocObject(txNONE) in IocLoader(TransIocLoader@2144340564)
2016-03-03 15:20:08,484 DEBUG [org.nutz.ioc.loader.map.MapLoader] - Loading define for name=txSERIALIZABLE
2016-03-03 15:20:08,484 DEBUG [org.nutz.ioc.loader.combo.ComboIocLoader] - Found IocObject(txSERIALIZABLE) in IocLoader(TransIocLoader@2144340564)
2016-03-03 15:20:08,484 DEBUG [org.nutz.ioc.loader.map.MapLoader] - Loading define for name=txREAD_UNCOMMITTED
2016-03-03 15:20:08,485 DEBUG [org.nutz.ioc.loader.combo.ComboIocLoader] - Found IocObject(txREAD_UNCOMMITTED) in IocLoader(TransIocLoader@2144340564)
2016-03-03 15:20:08,485 DEBUG [org.nutz.ioc.impl.ScopeContext] - Remove object 'indexKpiController' from [app]
2016-03-03 15:20:08,488 WARN [org.nutz.mvc.impl.processor.FailProcessor] - Error@/test :
org.nutz.ioc.IocException: more than one bean for type=[interface org.nutz.dao.Dao], names=[Ljava.lang.String;@3356525a FAIL to create Ioc Bean name=[indexKpiController]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:147)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:204)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:229)
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:116)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:196)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.nutz.ioc.IocException: more than one bean for type=[interface org.nutz.dao.Dao], names=[Ljava.lang.String;@3356525a
at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:39)
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:31)
at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:56)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:135)
... 31 more

4 回复

像是indexKpiController 注入dao的时候发现ioc里多个匹配的 不知道该怎么注入了

1.r.55的bug

改成这样写

@Inject Dao dao;

@milixiang 已经解决了 谢谢~

添加回复
请先登陆
回到顶部