其他分享
首页 > 其他分享> > SpringBoot项目使用内嵌Jetty

SpringBoot项目使用内嵌Jetty

作者:互联网

修改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>

 

标签:内嵌,SpringBoot,spring,boot,Jetty,springframework,org,starter
来源: https://www.cnblogs.com/live41/p/15858462.html