2022-04-15 14:17
@Override
public void configConstant(Constants me) {
me.setError404View("/common/html404.html");
me.setError500View("/common/html500.html");
me.setError401View("/common/html401.html");
me.setError403View("/common/html403.html");
me.setErrorView(405, "/common/html405.html");
me.setRenderFactory(new NewRenderFactory());
}
2022-04-15 14:17
public class NewRenderFactory extends RenderFactory {
@Override
public Render getFileRender(String fileName) {
return new NewFileRender(fileName);
}
@Override
public Render getFileRender(String fileName, String downloadFileName) {
return new NewFileRender(fileName, downloadFileName);
}
@Override
public Render getFileRender(File file) {
return new NewFileRender(file);
}
@Override
public Render getFileRender(File file, String downloadFileName) {
return new NewFileRender(file, downloadFileName);
}
@Override
public Render getRedirectRender(String url) {
return new NewRedirectRender(url);
}
@Override
public Render getRedirectRender(String url, boolean withQueryString) {
return new NewRedirectRender(url, withQueryString);
}
@Override
public Render getErrorRender(int errorCode) {
return new NewErrorRender(errorCode);
}
}
2020-06-02 19:23
@JFinal 我线上降成4.8版本,回头等新版本发出我再升级,不是太有必要就不想拓展代码,不然下次更新这块内容会忘记去除。最大程度保证不修改源码。谢谢大佬的指导,祝JFinal发展越来越好,同时,我也会向其他人推荐这么优秀的框架
2020-06-02 17:30
@JFinal 4.8没问题,我代码重新梳理了下,直接执行代码的main函数,控制台就能看到问题所在
2020-05-26 17:56
@JFinal idea配置undertow.devMode=false,然后手动ctrl+F9就能解决一切问题,需要重启服务idea会提示