getProperty("server.port")

This commit is contained in:
MaxKey
2023-09-15 21:05:09 +08:00
parent abe0089e71
commit 70afc70e29
3 changed files with 9 additions and 9 deletions

View File

@@ -18,8 +18,8 @@
package org.dromara.maxkey;
import org.apache.ibatis.io.VFS;
import org.dromara.maxkey.configuration.ApplicationConfig;
import org.dromara.maxkey.web.InitializeContext;
import org.dromara.maxkey.web.WebContext;
import org.dromara.mybatis.jpa.starter.SpringBootVFS;
import org.joda.time.DateTime;
import org.mybatis.spring.annotation.MapperScan;
@@ -56,11 +56,11 @@ public class MaxKeyApplication extends SpringBootServletInitializer {
logger.error("ServletException", e);
}
logger.info("MaxKey at {}" , new DateTime());
logger.info("MaxKey Server Port {}"
,applicationContext.getBean(ApplicationConfig.class).getPort());
logger.info("MaxKey Server Port {}" , WebContext.properties.getProperty("server.port"));
logger.info("MaxKey started.");
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(MaxKeyApplication.class);
}

View File

@@ -17,8 +17,8 @@
package org.dromara.maxkey;
import org.dromara.maxkey.configuration.ApplicationConfig;
import org.dromara.maxkey.web.InitializeContext;
import org.dromara.maxkey.web.WebContext;
import org.joda.time.DateTime;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
@@ -74,12 +74,12 @@ public class MaxKeyMgtApplication extends SpringBootServletInitializer {
logger.error("Exception ",e);
}
logger.info("MaxKeyMgt at {}" , new DateTime());
logger.info("MaxKeyMgt Server Port {}"
,applicationContext.getBean(ApplicationConfig.class).getPort());
logger.info("MaxKeyMgt Server Port {}" , WebContext.properties.getProperty("server.port"));
logger.info("MaxKeyMgt started.");
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(MaxKeyMgtApplication.class);
}

View File

@@ -18,8 +18,8 @@
package org.dromara.maxkey;
import org.dromara.maxkey.configuration.ApplicationConfig;
import org.dromara.maxkey.web.InitializeContext;
import org.dromara.maxkey.web.WebContext;
import org.joda.time.DateTime;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
@@ -70,12 +70,12 @@ public class MaxKeyOpenApiApplication extends SpringBootServletInitializer {
logger.error("Exception ",e);
}
logger.info("MaxKey OpenApi at {}" , new DateTime());
logger.info("MaxKey OpenApi Server Port {}"
,applicationContext.getBean(ApplicationConfig.class).getPort());
logger.info("MaxKey OpenApi Server Port {}" , WebContext.properties.getProperty("server.port"));
logger.info("MaxKey OpenApi started.");
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(MaxKeyOpenApiApplication.class);
}