2018-08-30 10:18
@JFinal 多谢,我加上了这个 restart.include.thirdparty=/jfinal-3.4.jar 搞定了
2018-06-13 13:23
@Bean(name = "jfinalViewResolver")
public JFinalViewResolver getJFinalViewResolver() {
JFinalViewResolver jfr = new JFinalViewResolver();
// setDevMode 配置放在最前面
jfr.setDevMode(true);
jfr.setSourceFactory(new ClassPathSourceFactory());
jfr.setPrefix("/templates/");
jfr.setSuffix(".html");
jfr.setContentType("text/html;charset=UTF-8");
jfr.setOrder(0);
jfr.setSessionInView(true);
jfr.setRequestContextAttribute("ctx");
return jfr;
}
前端使用 #(ctx.contextPath)即可