0
点赞
收藏
分享

微信扫一扫

SpringBoot默认的8080端口在哪?

eelq 2023-03-24 阅读 36

SpringBoot默认的8080端口在哪?_tomcat

 

进入到ServerProperties类

SpringBoot默认的8080端口在哪?_tomcat_02

 

ServerProperties这个类中,读取配置文件server开头的配置

SpringBoot默认的8080端口在哪?_默认值_03

 

定位类文件所在位置

SpringBoot默认的8080端口在哪?_tomcat_04

 

找到对应jar包的META-INF下的json文件,端口默认值在json文件中配置好了

SpringBoot默认的8080端口在哪?_tomcat_05

 

搜索:server.port,可以看到默认端口是8080

SpringBoot默认的8080端口在哪?_默认值_06

 

补充:

上面ServerProperties类是给ServletWebServerFactoryAutoConfiguration类用的:给tomcat做自动配置用的

SpringBoot默认的8080端口在哪?_默认值_07

 

进入类ServletWebServerFactoryAutoConfiguration,下面把属性配置信息注入到一个类上

SpringBoot默认的8080端口在哪?_tomcat_08

 

下面代码中也给了端口默认值

SpringBoot默认的8080端口在哪?_默认值_09

 

【bak】


本文作者:持之以恒(韧)
关于博主:擅长性能、全链路、自动化、企业级自动化持续集成(DevOps/TestOps)、测开等


举报

相关推荐

0 条评论