mirror of
https://gitee.com/nutz/nutzboot.git
synced 2024-11-30 02:38:28 +08:00
更新 AppContext.java
This commit is contained in:
parent
5c58b643da
commit
095e841895
@ -332,8 +332,12 @@ public class AppContext implements LifeCycle {
|
||||
}
|
||||
|
||||
public int getServerPort(String legacyKey, int defaultValue) {
|
||||
if (defaultValue == 8080 && legacyKey != null && getConf().has(legacyKey)) {
|
||||
log.infof("%s is deprecated, use %s instead", legacyKey, "server.port");
|
||||
if (defaultValue == 8080 && legacyKey != null && getConf().has(legacyKey)){
|
||||
log.infof("%s is deprecated, use %s instead,the defaultValue is %s", "server.port", legacyKey,"8080");
|
||||
return getConf().getInt(legacyKey);
|
||||
}
|
||||
if (legacyKey != null && getConf().has(legacyKey)) {
|
||||
log.infof("%s is deprecated, use %s instead", "server.port", legacyKey);
|
||||
return getConf().getInt(legacyKey);
|
||||
}
|
||||
int port = getConf().getInt("server.port", defaultValue);
|
||||
|
Loading…
Reference in New Issue
Block a user