dyc87112 / SpringCloud-Learning

Spring Cloud基础教程,持续连载更新中
http://blog.didispace.com
7.37k stars 2.88k forks source link

为什么我的eureka-server 首页无法显示 #10

Open jimxu1982 opened 7 years ago

jimxu1982 commented 7 years ago

1.pom.xml如下

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.7.RELEASE</version>
        <relativePath/> 
    </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.SR3</spring-cloud.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka-server</artifactId>
        </dependency>       
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

2.application.properties

spring.application.name=eureka-server
server.port=1001
eureka.instance.hostname=localhost
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false

3.http://localhost:1001/无示显示Dashboard,只返回一个xml default

CodingOX commented 7 years ago

application.properties 少配置了一个eureka的访问地址? eureka.client.servericeUrl.defualt=http://127.0.0.1:${server.port}/eureka

jimxu1982 commented 7 years ago

@CodingOX ,还是不对,我这个是通过spring-cloud-starter-eureka-serve 创建服务注册中心,不是服务提供者

studysai commented 6 years ago

eureka.client.serviceUrl.defaultZone=http://localhost:${server.port}/eureka/ 访问时localhost:1001/eureka