Jfinal Weixin点击微信菜单时抛异常

异常日志如下,请帮忙解决下:

Url         : POST /msg
Controller  : com.javen.weixin.controller.WeixinMsgController.(WeixinMsgController.java:1)
Method      : index
Interceptor : com.handler.ParaValidateInterceptor.(ParaValidateInterceptor.java:1)
              com.jfinal.weixin.sdk.jfinal.MsgInterceptor.(MsgInterceptor.java:1)
Parameter   : signature=15f70c0b1ec87c8af9980600dd26091144b12caf  timestamp=1520581870  nonce=84111626  openid=o3zK11TZFf4AnTUpSdGchgYzyvYo  
--------------------------------------------------------------------------------

2018-03-09 15:51:10
[ERROR]-[Thread: http-nio-8080-exec-1]-[com.jfinal.core.ActionHandler.handle()]: /msg?signature=15f70c0b1ec87c8af9980600dd26091144b12caf&timestamp=1520581870&nonce=84111626&openid=o3zK11TZFf4AnTUpSdGchgYzyvYo
com.jfinal.render.RenderException: java.lang.RuntimeException: File not found : /usr/local/tomcat-8080/webapps/wxapp/msg/index.html

评论区

JFinal

2018-03-09 16:41

在整个请求流程中,需要 render 一次,否则 jfinal 会默认帮你调用一个 render(view),规则是:
view = baseViewPath + viewPath + methodName + ".html";

对应到你的项目中,正好是 "/wxapp/msg/index.html"

当然,你可以通过调用 renderNull() 方法告知 jfinal 不要帮你调用 render(view)

热门反馈

扫码入社