JPress社区

windows访问前台错误

...

tyrone

下载JPress发行版,导入Eclipse,修改pom文件,让copy-resources输出到当前目录。

启动项目,install,登录,发布文章,查看文章。

报错~~~

 

跟踪发现是

io.jpress.core.template.Template.buildFolder();

这出问题...

String basePath = PathKit.getWebRootPath() + "/templates/";

此处直接+ "/templates/";

没有考虑到windows路径分割是\不是/问题。

 

 

此处修改为:

String basePath = PathKit.getWebRootPath().concat(File.separator).concat("templates").concat(File.separator);

保存,继续访问~~~~

 

一切正常,完美~~~