17-3-31 17:30:14.388 DEBUG [http-bio-8080-exec-6] Found mapping for [POST] path=/user/login : UserModule.login(UserModule.java:27)
17-3-31 17:30:14.388 DEBUG [http-bio-8080-exec-6] Get 'userModule'<class com.demo.module.UserModule>
17-3-31 17:30:14.388 DEBUG [http-bio-8080-exec-6] >> Load definition name=userModule
17-3-31 17:30:14.388 DEBUG [http-bio-8080-exec-6] Loading define for name=userModule
17-3-31 17:30:14.389 DEBUG [http-bio-8080-exec-6] Found IocObject(userModule) in JsonLoader(paths=[config/])
17-3-31 17:30:14.389 DEBUG [http-bio-8080-exec-6] >> Make...'userModule'<class com.demo.module.UserModule>
17-3-31 17:30:14.390 DEBUG [http-bio-8080-exec-6] Load class com.demo.module.UserModule without AOP
17-3-31 17:30:14.390 DEBUG [http-bio-8080-exec-6] Save object 'userModule' to [app]
17-3-31 17:30:14.390 DEBUG [http-bio-8080-exec-6] Remove object 'userModule' from [app]
17-3-31 17:30:14.391 WARN [http-bio-8080-exec-6] Error@/user/login :
org.nutz.ioc.IocException: [userModule] # FAIL to create Ioc Bean name=[userModule]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
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:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Fail to eval Injector for field: 'userService'
at org.nutz.lang.Lang.wrapThrow(Lang.java:165)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:128)
... 27 more
Caused by: java.lang.RuntimeException: java.lang.NoSuchFieldException: Can NOT find field [userService] in class [com.demo.module.UserModule] and it's parents classes
at org.nutz.lang.Lang.wrapThrow(Lang.java:182)
at org.nutz.lang.Mirror.getInjecting(Mirror.java:1048)
at org.nutz.ioc.weaver.FieldInjector.create(FieldInjector.java:18)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:125)
... 27 more
Caused by: java.lang.NoSuchFieldException: Can NOT find field [userService] in class [com.demo.module.UserModule] and it's parents classes
at org.nutz.lang.Mirror.getField(Mirror.java:476)
at org.nutz.lang.Mirror.getInjecting(Mirror.java:1039)
... 29 more
9 回复
var handler = {
userModule : {
type : "com.demo.module.UserModule",
fields : {
userService : { refer : "userService" }
}
},
menuModule : {
type : "com.demo.module.MenuModule",
fields : {
menuService : { refer : "menuService" }
}
}
}
var service = {
userService : {
type : "com.demo.service.UserService",
fields : {
dao : { refer : "dao" }
}
},
menuService : {
type : "com.demo.service.MenuService",
fields : {
dao : { refer : "dao" }
}
}
}
var handler = {
userModule : {
type : "com.demo.module.UserModule",
fields : {
userService : { refer : "userService" }
}
},
menuModule : {
type : "com.demo.module.MenuModule",
fields : {
menuService : { refer : "menuService" }
}
}
}
var service = {
userService : {
type : "com.demo.service.UserService",
fields : {
dao : { refer : "dao" }
}
},
menuService : {
type : "com.demo.service.MenuService",
fields : {
dao : { refer : "dao" }
}
}
}
我是这样写的 为什么错了 还有 哪里缺个userService呢 我现在还不会注解配置....
添加回复
请先登陆