windows访问前台错误
- 需求发布
- 2620次浏览
下载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);
保存,继续访问~~~~
一切正常,完美~~~
2个回答
已经修复
海哥
回复点赞! pull了一下 发现源码昨天已经更新 和你说的一模一样
joe
回复