Configure multiple servletcontainers/servlets with spring boot

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.

Leave a Comment