配置文件添加警告

This commit is contained in:
heavyrain2012
2021-11-20 11:07:46 +08:00
parent 0390d44c63
commit 7824fb3844
2 changed files with 10 additions and 0 deletions
@@ -356,6 +356,13 @@ public class Server {
MediaServerConfig.FILE_STROAGE_REMOTE_SERVER_URL = config.getProperty(FILE_STORAGE_REMOTE_SERVER_URL);
MediaServerConfig.USER_QINIU = Integer.parseInt(config.getProperty(BrokerConstants.USER_QINIU)) > 0;
if(MediaServerConfig.USER_QINIU) {
if(MediaServerConfig.QINIU_SERVER_URL.split(":").length == 2) {
String error = "媒体存储服务只能填上Host,不能带端口";
System.out.println(error);
LOG.error(error);
}
}
}
private String getServerIp(IConfig config) {
@@ -54,6 +54,9 @@ public class DBUtil {
if (embedDB != null && embedDB.equals("1")) {
IsEmbedDB = true;
LOG.info("Use h2 database");
String warning = "您正在使用内置h2数据库,建议仅在开发验证或者用户数小于100人时才使用此数据库,其它情况建议使用MySQL。";
System.out.println(warning);
LOG.warn(warning);
} else {
IsEmbedDB = false;
LOG.info("Use mysql database");