Reputation: 6329
I am trying to start a Eureka server with basic configuration, but the dashboard will not load. Instead, below XML is being returned.
Please find the below code.
In application.yml file
eureka:
environment: qa
client:
fetch-registry: false
register-with-eureka: false
dashboard:
enabled: true
spring:
application:
name: eureka-server
server:
port: 8761
Main class:
@SpringBootApplication
@EnableEurekaServer
public class MygynecologistEurekaServerApplication {
public static void main(String[] args) {
SpringApplication.run(MygynecologistEurekaServerApplication.class, args);
}
}
pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Dalston.RELEASE</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
A similar question was asked here, but it was resolved. Thanks for reading.
UPDATE: with the same code I was able to load the eureka dashboard in a windows machine(windows 8.1) . But it doesn't work in my macbook pro. Should we have to add any extra settings for mac?
Upvotes: 1
Views: 3750
Reputation: 10095
I had the same problem. To fix it I had to do the following:
resources/static
and resources/templates
folders.build
(or out
) directory.Once you restart the eureka service, you should be able to see the Eureka dashboard.
Upvotes: 4
Reputation: 6329
I finally found a solution. The issue has got something to do with the versions I used. I made the following changes to fix it
Upvotes: 2