我想在启动spring boot项目时记录嵌入式服务器的端口。我正在使用log4j作为提供程序。是否有任何类别可以做到这一点?
例如:Tomcat started on port 8080
答案 0 :(得分:0)
默认情况下已记录
INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8080 (http)
...
INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8080 (http) with context path ''