|
|
|
@ -23,7 +23,7 @@ import com.jfinal.kit.Prop;
|
|
|
|
|
import com.dsideal.dsBase.Plugin.YamlProp;
|
|
|
|
|
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
|
|
|
|
|
import com.jfinal.plugin.activerecord.dialect.PostgreSqlDialect;
|
|
|
|
|
import com.jfinal.plugin.hikaricp.HikariCpPlugin;
|
|
|
|
|
import com.jfinal.plugin.druid.DruidPlugin;
|
|
|
|
|
import com.jfinal.plugin.redis.RedisPlugin;
|
|
|
|
|
import com.jfinal.server.undertow.UndertowServer;
|
|
|
|
|
import com.jfinal.template.Engine;
|
|
|
|
@ -112,11 +112,11 @@ public class BaseApplication extends JFinalConfig {
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void configPlugin(Plugins me) {
|
|
|
|
|
HikariCpPlugin hp = new HikariCpPlugin(PropKit.get("postgresql.jdbcUrl"),
|
|
|
|
|
PropKit.get("postgresql.user"), PropKit.get("postgresql.password"),
|
|
|
|
|
PropKit.get("postgresql.driverClassName"));
|
|
|
|
|
me.add(hp);
|
|
|
|
|
ActiveRecordPlugin arp = new ActiveRecordPlugin(hp);
|
|
|
|
|
DruidPlugin druid = new DruidPlugin(PropKit.get("jdbcUrl"),
|
|
|
|
|
PropKit.get("user"), PropKit.get("password"),
|
|
|
|
|
PropKit.get("driverClassName"));
|
|
|
|
|
me.add(druid);
|
|
|
|
|
ActiveRecordPlugin arp = new ActiveRecordPlugin(druid);
|
|
|
|
|
arp.setDialect(new PostgreSqlDialect());
|
|
|
|
|
String basePath = Objects.requireNonNull(BaseApplication.class.getClassLoader().getResource(".")).getPath();
|
|
|
|
|
File sqlDir = new File(basePath + "/Sql");
|
|
|
|
|