prepare db url
@@ -92,9 +92,14 @@ public class DbConfig {
* @return jdbc
*/
public String getDbUrl() {
+ ServerExtConfigBean instance = ServerExtConfigBean.getInstance();
+ String dbUrl = instance.getDbUrl();
+ if (StrUtil.isNotEmpty(dbUrl)) {
+ return dbUrl;
+ }
File file = FileUtil.file(DbConfig.getInstance().dbLocalPath(), JpomApplication.getAppType().name());
String path = FileUtil.getAbsolutePath(file);
- return StrUtil.format("jdbc:h2:{};CACHE_SIZE={}", path, ServerExtConfigBean.getInstance().getCacheSize().toKilobytes());
+ return StrUtil.format("jdbc:h2:{};CACHE_SIZE={}", path, instance.getCacheSize().toKilobytes());
}
/**
