@wendal
我的webapp
@IocBy(args = {})
@Modules(scanPackage = false)
@LoadingBy(Hotplug.class)
@SetupBy(MainSetup.class)
@Views({BeetlViewMaker.class})
public class MainModule {
@Ok("http:200")
@At
public void test() {
}
}
yvr
public class YvrMainModule {
@Ok("beetl:yvr.index")
@At("/yvr/test")
public void test() {
System.out.println("YvrModule成功访问!");
}
}
index.html放在yvr\src\main\resources\templates\yvr\index.html,还是访问不到为啥啊?报错:
YvrModule成功访问!
TEMPLATE_LOAD_ERROR
at org.beetl.core.resource.FileResource.openReader(FileResource.java:45)
at org.beetl.core.GroupTemplate.loadTemplate(GroupTemplate.java:632)
at org.beetl.core.GroupTemplate.getTemplateByLoader(GroupTemplate.java:582)
at org.beetl.core.GroupTemplate.getTemplate(GroupTemplate.java:546)
at org.beetl.ext.web.WebRender.render(WebRender.java:85)
at org.beetl.ext.nutz.BeetlView.render(BeetlView.java:28)
at org.nutz.mvc.impl.processor.ViewProcessor.process(ViewProcessor.java:66)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:33)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
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:202)
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:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
17-10-10 13:53:05.927 DEBUG [http-nio-8080-exec-4] 模板根目录为 E:\Projects\Private\nutz-hotplug\hotplugtest\webapp\target\webapp\
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:498)
>>01:53:05:错找不到指定模板或者加载错(TEMPLATE_LOAD_ERROR): 位于0行 资源:yvr.index 模板根目录为 E:\Projects\Private\nutz-hotplug\hotplugtest\webapp\target\webapp\
WebAppResourceLoader,Root=E:\Projects\Private\nutz-hotplug\hotplugtest\webapp\target\webapp\
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:796)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1374)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)