eureka正常启动后无法访问eureka页面
yml配置如下
spring:
application:
name: ad-eureka
freemarker:
prefer-file-system-access: false
server:
port: 8000
eureka:
instance:
hostname: localhost
client:
fetch-registry: false
register-with-eureka: false
service-url:
defaultZone: http://eureka.instance.hostname:{eureka.instance.hostname}:eureka.instance.hostname:{server.port}/eureka/
pom.xml配置如下
4.0.0
com.cloud.ad
cloud-ad
1.0-SNAPSHOT
<artifactId>ad-eureka</artifactId>
<packaging>jar</packaging>
<name>ad-eureka</name>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
</dependencies>
hosts也配置了
127.0.0.1 localhost
网上找的解决办法也没有用https://blog.csdn.net/w546097639/article/details/78931235
服务启动是正常的。
[2m2019-03-02 12:56:11.148[0;39m [32m INFO[0;39m [35m6036[0;39m [2m—[0;39m [2m[
Thread-13][0;39m [36me.s.EurekaServerInitializerConfiguration[0;39m [2m:[0;39m
Started Eureka Server
[2m2019-03-02 12:56:11.179[0;39m [32m INFO[0;39m [35m6036[0;39m [2m—[0;39m [2m[ main][0;39m [36mo.s.b.w.embedded.tomcat.TomcatWebServer [0;39m [2m:[0;39m
Tomcat started on port(s): 8000 (http) with context path ''
[2m2019-03-02 12:56:11.180[0;39m [32m INFO[0;39m [35m6036[0;39m [2m—[0;39m [2m[ main][0;39m [36m.s.c.n.e.s.EurekaAutoServiceRegistration[0;39m [2m:[0;39m
Updating port to 8000
[2m2019-03-02 12:56:11.184[0;39m [32m INFO[0;39m [35m6036[0;39m [2m—[0;39m [2m[ main][0;39m [36morg.ad.eureka.EurekaApplication [0;39m [2m:[0;39m
Started EurekaApplication in 12.487 seconds (JVM running for 13.948)