Configure multiple servletcontainers/servlets with spring boot

爱⌒轻易说出口 提交于 2019-12-17 10:44:29

问题


I want to load two servlet containers with embedded tomcat configuration on different ports with Spring Boot.

Does anyone know how to achieve this?


回答1:


It should be simple: just create as many ApplicationContexts of type EmbeddedWebApplicationContext as you need and give them each an EmbeddedServletContainerFactory with a different port. Example here where the two contexts are parent and child, but that's not a necessary part of the setup.



来源:https://stackoverflow.com/questions/21630820/configure-multiple-servletcontainers-servlets-with-spring-boot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!