Yogesh A
Yogesh A

Reputation: 11

How to run multiple microservices in one jvm

I have around 10 microservices which are spring boot applications, how to run those microservices in one jvm in a single port.

Upvotes: 0

Views: 689

Answers (1)

Simon Martinelli
Simon Martinelli

Reputation: 36103

You can change the packaging to war and then run the wars in an app server like Tomcat.

  1. Change packaging from jar to war
  2. extend SpringBootServletInitializer
  3. Mark tomcat dependency as provided

Please find the official documentation here: https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto.traditional-deployment

Upvotes: 1

Related Questions