修改Maven配置(pom.xml)即可

 

1.先在spring-boot-starter-web排除内嵌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>

 

2.加入Jetty依赖属性

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

 

相关文章:

  • 2021-11-17
  • 2021-09-27
  • 2018-06-05
  • 2022-01-13
  • 2022-02-23
  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-25
  • 2022-01-02
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
相关资源
相似解决方案