use of org.springframework.boot.web.context.WebServerApplicationContext in project springboot-demo by small-rose.
the class AppServerInfo method onApplicationEvent.
@SneakyThrows
@Override
public void onApplicationEvent(WebServerInitializedEvent event) {
WebServer server = event.getWebServer();
WebServerApplicationContext context = event.getApplicationContext();
Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
int port = server.getPort();
String contextPath = env.getProperty("server.servlet.context-path");
if (contextPath == null) {
contextPath = "";
}
String termsOfServiceUrl = swaggerConfig.apiInfo().getTermsOfServiceUrl();
log.info("\n------------------------------------------------------------\n" + "\tApplication is running! Access address:\n" + "\tLocal:\t\thttp://localhost:{}{}" + "\n\tExternal:\thttp://{}:{}{}" + "\n\tCheckUrl:\thttp://{}:{}{}{}" + "\n\tApiInfo:\t{}" + "\n------------------------------------------------------------\n", port, contextPath, ip, port, contextPath, ip, port, contextPath, "/path", termsOfServiceUrl);
}
use of org.springframework.boot.web.context.WebServerApplicationContext in project springboot-demo by small-rose.
the class AppServerInfo method onApplicationEvent.
@SneakyThrows
@Override
public void onApplicationEvent(WebServerInitializedEvent event) {
WebServer server = event.getWebServer();
WebServerApplicationContext context = event.getApplicationContext();
Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
int port = server.getPort();
String contextPath = env.getProperty("server.servlet.context-path");
if (contextPath == null) {
contextPath = "";
}
String termsOfServiceUrl = swaggerConfig.apiInfo().getTermsOfServiceUrl();
log.info("\n------------------------------------------------------------\n" + "\tApplication is running! Access address:\n" + "\tLocal:\t\thttp://localhost:{}{}" + "\n\tExternal:\thttp://{}:{}{}" + "\n\tCheckUrl:\thttp://{}:{}{}{}" + "\n\tApiInfo:\t{}" + "\n------------------------------------------------------------\n", port, contextPath, ip, port, contextPath, ip, port, contextPath, "/path", termsOfServiceUrl);
}
use of org.springframework.boot.web.context.WebServerApplicationContext in project springboot-demo by small-rose.
the class AppServerInfo method onApplicationEvent.
@SneakyThrows
@Override
public void onApplicationEvent(WebServerInitializedEvent event) {
WebServer server = event.getWebServer();
WebServerApplicationContext context = event.getApplicationContext();
Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
int port = server.getPort();
String contextPath = env.getProperty("server.servlet.context-path");
if (contextPath == null) {
contextPath = "";
}
log.info("\n------------------------------------------------------------\n" + "\tApplication is running! Access address:\n" + "\tLocal:\t\thttp://localhost:{}{}" + "\n\tExternal:\thttp://{}:{}{}" + "\n------------------------------------------------------------\n", port, contextPath, ip, port, contextPath);
}
use of org.springframework.boot.web.context.WebServerApplicationContext in project springboot-demo by small-rose.
the class AppServerInfo method onApplicationEvent.
@SneakyThrows
@Override
public void onApplicationEvent(WebServerInitializedEvent event) {
WebServer server = event.getWebServer();
WebServerApplicationContext context = event.getApplicationContext();
Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
int port = server.getPort();
String contextPath = env.getProperty("server.servlet.context-path");
if (contextPath == null) {
contextPath = "";
}
String termsOfServiceUrl = swaggerConfig.apiInfo().getTermsOfServiceUrl();
log.info("\n------------------------------------------------------------\n" + "\tApplication is running! Access address:\n" + "\tLocal:\t\thttp://localhost:{}{}" + "\n\tExternal:\thttp://{}:{}{}" + "\n\tCheckUrl:\thttp://{}:{}{}{}" + "\n\tApiInfo:\t{}" + "\n------------------------------------------------------------\n", port, contextPath, ip, port, contextPath, ip, port, contextPath, "/path", termsOfServiceUrl);
}
use of org.springframework.boot.web.context.WebServerApplicationContext in project dynamic-tp by lyh200.
the class AbstractWebServerTpHandler method getWebServerTp.
@Override
public Executor getWebServerTp() {
if (webServerExecutor == null) {
synchronized (AbstractWebServerTpHandler.class) {
if (webServerExecutor == null) {
ApplicationContext applicationContext = ApplicationContextHolder.getInstance();
WebServer webServer = ((WebServerApplicationContext) applicationContext).getWebServer();
webServerExecutor = doGetTp(webServer);
}
}
}
return webServerExecutor;
}
Aggregations