We are trying to create a dashboard for our application as a single point of entry/configuration. For this we will build and UI and would like to run Spring Cloud Config and Eureka on same instance. Is there any reason why we should not do this and if not is it possible?
@mvlupan, there is nothing keeping you from using together. That is one of the reasons we created @EnableEurekaServer
and @EnableConfigServer
.
pom.xml
snippet.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.7.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
</dependency>
</dependencies>
Application.java
snippet
@EnableEurekaServer
@EnableConfigServer
@SpringBootApplication
public class DemoconfigandeurekaserverApplication { /*...*/}
application.properties
snippet (so eureka and config server don't clash).
spring.cloud.config.server.prefix=/config
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With