Reputation: 169
Is there any documentation available related to deploying eureka server on web container like tomcat. I use the spring provided sample and created a war, also renamed it to 'eureka.war' but the dashboard is not displayed..
The code works fine with spring boot but looks some configuration is required for deploying it as war.
Upvotes: 1
Views: 1374
Reputation: 25177
See this commit: https://github.com/spring-cloud-samples/eureka/commit/1de7c89cf3f79e4707dbabe91ea60eb06f2268aa
In pom.xml
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
In EurekaApplication.java
public class EurekaApplication extends SpringBootServletInitializer { /*...*/ }
Upvotes: 3