2016-12-02 54 views
3

有一个尤里卡Server应用程序:春天尤里卡应用程序不显示仪表板

@EnableEurekaServer 
@SpringBootApplication 
public class RegistrationModulesServiceApplication { 

    public static void main(String[] args) { 
     SpringApplication.run(RegistrationModulesServiceApplication.class, args); 
    } 
} 

随着applicaton.yml配置(是默认):

eureka: 
    instance: 
    hostname: localhost 
    client: 
    registerWithEureka: false 
    fetchRegistry: false 

server: 
    port: 1111 

在第一次运行 - 我看到仪表板与状态。 像文档: enter image description here

然后 - 重新启动后,我只能看到XML响应: enter image description here

为什么?

日志中没有错误。

回答

0

尝试使用这个春天开机/云版本:

<parent> 
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-starter-parent</artifactId> 
    <version>1.5.1.RELEASE</version> 
    <relativePath /> <!-- lookup parent from repository --> 
</parent> 

<dependencyManagement> 
    <dependencies> 
     <dependency> 
      <groupId>org.springframework.cloud</groupId> 
      <artifactId>spring-cloud-dependencies</artifactId> 
      <version>Dalston.BUILD-SNAPSHOT</version> 
      <type>pom</type> 
      <scope>import</scope> 
     </dependency> 
    </dependencies> 
</dependencyManagement> 

,也许设置环境

eureka: 
    environment: dev 

有一个在this github project

0

对我来说,一个完整的例子,这个问题是我有一个空的文件夹,src/main/resources/templates。当此文件夹存在时,FreeMarkerView无法看到spring-cloud-netflix-eureka-server中包含的嵌入式模板。我不记得这个文件夹来自哪里,但我怀疑它在线样本。

相关问题