修复可能存在的异常

This commit is contained in:
小海
2019-11-29 23:21:32 +08:00
parent 753ea5c9a1
commit a77dc695f6

View File

@@ -43,6 +43,9 @@ public class SitemapGenerateUtil {
@Async @Async
public void createSitemap() { public void createSitemap() {
initList(); initList();
if ("".equals(path) || "classpath".equals(path)) {
path = System.getProperty("user.dir")+"/sitemap.xml";
}
File file = new File(path); File file = new File(path);
try { try {
if (file.exists()) { if (file.exists()) {