首页 > 其他分享 >SpringBoot默认的8080端口在哪?

SpringBoot默认的8080端口在哪?

时间:2023-02-02 21:02:18浏览次数:61  
标签:8080 SpringBoot 配置文件 端口 默认 ServletWebServerFactoryAutoConfiguration ServerProper

配置文件中,点击port

 

进入到ServerProperties类

 

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

 

定位类文件所在位置

 

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

 

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

 

补充:

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

 

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

 

原文:https://www.cnblogs.com/uncleyong/p/17086648.html

 

标签:8080,SpringBoot,配置文件,端口,默认,ServletWebServerFactoryAutoConfiguration,ServerProper
From: https://www.cnblogs.com/uncleyong/p/17086648.html

相关文章

  • springboot上传资源到本地,数据库中存url
    importjava.io.File;importjava.io.IOException;importjava.net.URLEncoder;importjava.util.UUID;importorg.springframework.beans.factory.annotation.Autow......
  • SpringBoot Test - 典型的Springboot test注解说明
     重点汇总1.一个典型的springboottest的class写法: 2.@RunWith(SpringRunner.class)@RunWith,就是一个运行期,顾名思义就是“在XX环境下运行”。@RunWith(JUnit4.c......
  • @SpringBootApplication注解祥解
    @SpringBootApplication注解的详细分析 @SpringBootConfiguration:声明当前是一个配置类@ComponentScan:指出扫描进容器的文件 @EnableAutoConf......
  • SpringBoot下动态数据源
    第一种:Mybatis-Plus的dynamic-datasourceGitee地址:https://gitee.com/baomidou/dynamic-datasource-spring-boot-starter要实现其实很简单,一个注解就可以了1、创建......
  • 如何查看和修改防火墙开放端口与规则
    答案就是修改配置文件!在/etc/firewalld/zones/public.xml中[root@xxx~]#vim/etc/firewalld/zones/public.xml<?xmlversion="1.0"encoding="utf-8"?><zone><sho......
  • SpringBoot配置jdk11
    最近想尝试用jdk11跑一下SpringBoot,在网上找了篇还不错的博客,​​地址​​,jdk11有很多不错的改进,因此有必要把万年不换的jdk8给换一下修改properties替换mavn插件<plugin>......
  • Linux查看端口是否开放
    #需要切换你到root用户,有输出则则被占用lsof-i:9200netstat可以使用netstat继续了解详情​​​关于netstat的知乎这篇文章讲的不错​​......
  • Springboot数据库配置文件加密
    引入工具依赖包:!--配置文件加密--><dependency><groupId>com.github.ulisesbocchio</groupId><artifactId>jasypt-spring-boot-starter</artifactId><version>1.......
  • SpringBoot框架下shiro与jwt的结合的用户登录
    写了一次使用shiro和jwt的用户登录(没有涉及到用户权限的控制),下面进行很简单的技术总结之前使用的是Redis中保存用户信息,使用uuid-用户信息的键值对来判断用户......
  • SpringBoot学习笔记 - 构建、简化原理、快速启动、配置文件与多环境配置、技术整合案
    【前置内容】Spring学习笔记全系列传送门:Spring学习笔记-第一章-IoC(控制反转)、IoC容器、Bean的实例化与生命周期、DI(依赖注入)Spring学习笔记-第二章-注解......