配置文件添加警告
This commit is contained in:
@@ -356,6 +356,13 @@ public class Server {
|
|||||||
MediaServerConfig.FILE_STROAGE_REMOTE_SERVER_URL = config.getProperty(FILE_STORAGE_REMOTE_SERVER_URL);
|
MediaServerConfig.FILE_STROAGE_REMOTE_SERVER_URL = config.getProperty(FILE_STORAGE_REMOTE_SERVER_URL);
|
||||||
|
|
||||||
MediaServerConfig.USER_QINIU = Integer.parseInt(config.getProperty(BrokerConstants.USER_QINIU)) > 0;
|
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) {
|
private String getServerIp(IConfig config) {
|
||||||
|
|||||||
@@ -54,6 +54,9 @@ public class DBUtil {
|
|||||||
if (embedDB != null && embedDB.equals("1")) {
|
if (embedDB != null && embedDB.equals("1")) {
|
||||||
IsEmbedDB = true;
|
IsEmbedDB = true;
|
||||||
LOG.info("Use h2 database");
|
LOG.info("Use h2 database");
|
||||||
|
String warning = "您正在使用内置h2数据库,建议仅在开发验证或者用户数小于100人时才使用此数据库,其它情况建议使用MySQL。";
|
||||||
|
System.out.println(warning);
|
||||||
|
LOG.warn(warning);
|
||||||
} else {
|
} else {
|
||||||
IsEmbedDB = false;
|
IsEmbedDB = false;
|
||||||
LOG.info("Use mysql database");
|
LOG.info("Use mysql database");
|
||||||
|
|||||||
Reference in New Issue
Block a user