项目中,需要配置服务对外提供多个不同的端口,以保证访问不同的服务,进行不同业务的处理。使用的是Springboot+Undertow服务容器的方式。
1. undertow依赖的pom文件
<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>

本文介绍了如何在Springboot项目中利用Undertow实现服务容器,通过配置文件和自定义类来设置多个监听端口,确保不同业务处理的访问。
最低0.47元/天 解锁文章
2558

被折叠的 条评论
为什么被折叠?



