phdeblog

1、配置端口等信息

#配置端口号
server.port=8081
#配置上下文路径
server.servlet.context-path=/admin
#配置tomcat编码
server.tomcat.uri-encoding=utf-8

2、移除自带的tomcat并配置其他的容器

         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>


        <dependency>
            <groupId> org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jetty</artifactId>
        </dependency>

 

分类:

技术点:

相关文章:

  • 2022-01-04
  • 2022-12-23
  • 2021-10-08
  • 2022-01-06
  • 2021-06-03
  • 2022-12-23
  • 2021-09-06
猜你喜欢
  • 2021-10-06
  • 2022-12-23
  • 2022-01-12
  • 2021-11-23
  • 2021-09-19
  • 2022-12-23
  • 2021-07-07
相关资源
相似解决方案