NutzCN Logo
问答 麻烦帮看下swagger报错,运行不出来
发布于 91天前 作者 qq_753729fe 171 次浏览 复制 上一个帖子 下一个帖子
标签:
[2019-01-20 04:04:31,906] Artifact errand:war exploded: Deploy took 9,813 milliseconds
[DEBUG] 16:04:41.583 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:110) - Search mapping for [GET] path=/swagger : NOT Action match
[DEBUG] 16:04:41.680 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:101) - Found mapping for [GET] path=/swagger/swagger : SwaggerModule.swagger(SwaggerModule.java:35)
[DEBUG] 16:04:41.685 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) - Get 'swaggerModule'<class com.errand.web.module.SwaggerModule>
[DEBUG] 16:04:41.685 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:192) - 	 >> Load definition name=swaggerModule
[DEBUG] 16:04:41.685 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(swaggerModule) in AnnotationIocLoader(packages=[com.errand])
[DEBUG] 16:04:41.686 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:223) - 	 >> Make...'swaggerModule'<class com.errand.web.module.SwaggerModule>
[DEBUG] 16:04:41.686 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:65) - Save object 'swaggerModule' to [app] 
[DEBUG] 16:04:41.686 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:76) - Load class com.errand.web.module.SwaggerModule without AOP
[DEBUG] 16:04:41.694 org.nutz.ioc.impl.ScopeContext.remove(ScopeContext.java:85) - Remove object 'swaggerModule' from [app] 
[DEBUG] 16:04:41.694 com.errand.mvc.LogTimeProcessor.process(LogTimeProcessor.java:34) - [ GET]URI=/swagger/swagger.json 14ms
[WARN ] 16:04:41.697 org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:28) - Error@/swagger/swagger :
org.nutz.ioc.IocException: IocBean[swaggerModule] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
	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.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.errand.mvc.LogTimeProcessor.process(LogTimeProcessor.java:29)
	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:202)
	at com.errand.mvc.MainNutFilter.doFilter(MainNutFilter.java:60)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: Fail to find Method com.errand.web.module.SwaggerModule->init with params:
[]
	at org.nutz.lang.Lang.wrapThrow(Lang.java:187)
	at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:182)
	at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:89)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:141)
	... 33 more
Caused by: java.lang.NoSuchMethodException: Fail to find Method com.errand.web.module.SwaggerModule->init with params:
[]
	at org.nutz.lang.Mirror.findMethod(Mirror.java:1192)
	at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:177)
	... 35 more

2 回复

SwaggerModule缺init方法

谢谢,我的init方法设置成了priviate反而不行,要设置成public

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