@JFinal 我已做了如下配置,为什么还是报错?
[ERROR]-[Thread: http-8080-4]-[com.jfinal.core.ActionHandler.handle()]: /login
com.jfinal.render.RenderException: com.jfinal.template.TemplateException: "session" can not be null for accessed by "session.user"
Template: "/common/header.html". Line: 4
/** * 配置全局拦截器 */ public void configInterceptor(Interceptors me) { me.add(new com.demo.Interceptor.LoginInterceptor()); me.add(new SessionInViewInterceptor()); }
html:
当前用户:<span><a>#(session.user.name)(#(session.user.usrId))</a></span>
项目:JFinal