美文网首页
[Spring Boot]Undertow替换Tomcat

[Spring Boot]Undertow替换Tomcat

作者: kun1988 | 来源:发表于2016-11-22 23:00 被阅读0次
优化spring boot

Undertow是Wildfly的web服务器,性能不必多说,在嵌入微服务方面比tomcat更小。
gradle环境

configurations {
    compile.exclude module: 'spring-boot-starter-tomcat'
}
dependencies {
    compile('org.springframework.boot:spring-boot-starter-web')
    compile('org.springframework.boot:spring-boot-starter-undertow')
    // ...
}

maven环境

<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-undertow</artifactId>
</dependency>

我一台主机要放多个应用,为了节省机器内存,所以选择更节省内存的容器,

相关文章

网友评论

      本文标题:[Spring Boot]Undertow替换Tomcat

      本文链接:https://www.haomeiwen.com/subject/pxumpttx.html