|
|
@ -31,10 +31,10 @@ import lombok.SneakyThrows;
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.File;
|
|
|
|
import java.util.Objects;
|
|
|
|
import java.util.Objects;
|
|
|
|
|
|
|
|
|
|
|
|
public class Start extends JFinalConfig {
|
|
|
|
public class BaseApplication extends JFinalConfig {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
PropKit.use("application.properties");
|
|
|
|
PropKit.use("application.properties");
|
|
|
|
UndertowServer.create(Start.class, "undertow.properties").start();
|
|
|
|
UndertowServer.create(BaseApplication.class, "undertow.properties").start();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -90,7 +90,7 @@ public class Start extends JFinalConfig {
|
|
|
|
me.add(hp);
|
|
|
|
me.add(hp);
|
|
|
|
ActiveRecordPlugin arp = new ActiveRecordPlugin(hp);
|
|
|
|
ActiveRecordPlugin arp = new ActiveRecordPlugin(hp);
|
|
|
|
arp.setDialect(new PostgreSqlDialect());
|
|
|
|
arp.setDialect(new PostgreSqlDialect());
|
|
|
|
String basePath = Start.class.getClassLoader().getResource(".").getPath();
|
|
|
|
String basePath = BaseApplication.class.getClassLoader().getResource(".").getPath();
|
|
|
|
File sqlDir = new File(basePath + "/Sql");
|
|
|
|
File sqlDir = new File(basePath + "/Sql");
|
|
|
|
for (File sqlFile : Objects.requireNonNull(sqlDir.listFiles())) {
|
|
|
|
for (File sqlFile : Objects.requireNonNull(sqlDir.listFiles())) {
|
|
|
|
if (sqlFile.getName().indexOf(".sql") > 0) {
|
|
|
|
if (sqlFile.getName().indexOf(".sql") > 0) {
|
|
|
@ -160,7 +160,7 @@ public class Start extends JFinalConfig {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onStart() {
|
|
|
|
public void onStart() {
|
|
|
|
//打印 启动Logo
|
|
|
|
//打印 启动Logo
|
|
|
|
String path = Start.class.getClassLoader().getResource("logo.txt").getPath();
|
|
|
|
String path = BaseApplication.class.getClassLoader().getResource("logo.txt").getPath();
|
|
|
|
File file = new File(path);
|
|
|
|
File file = new File(path);
|
|
|
|
System.out.println(FileUtil.readUtf8String(file));
|
|
|
|
System.out.println(FileUtil.readUtf8String(file));
|
|
|
|
|
|
|
|
|