main
HuangHai 3 months ago
parent 2a1cca09ae
commit 3dcb88e9a7

@ -32,7 +32,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.util.Objects;
public class BaseApplication extends JFinalConfig {
@ -119,7 +118,7 @@ public class BaseApplication extends JFinalConfig {
me.add(hp);
ActiveRecordPlugin arp = new ActiveRecordPlugin(hp);
arp.setDialect(new PostgreSqlDialect());
String basePath = BaseApplication.class.getClassLoader().getResource(".").getPath();
String basePath = Objects.requireNonNull(BaseApplication.class.getClassLoader().getResource(".")).getPath();
File sqlDir = new File(basePath + "/Sql");
for (File sqlFile : Objects.requireNonNull(sqlDir.listFiles())) {
if (sqlFile.getName().indexOf(".sql") > 0) {

Loading…
Cancel
Save