将Eureka War服务器部署到tomcat8.5中,但无法访问

时间:2019-05-02 09:50:49

标签: tomcat deployment server netflix-eureka

我在IDEA中创建了一个eureka项目,效果很好。但是,当我将它打包到战争中并扔到tomcat 8.5的webapp目录中时。重新启动tomcat后,我无法通过URL localhost:8761来访问它

EurekaApplication.java

@SpringBootApplication
@EnableEurekaServer
public class EurekaApplication {
    public static void main( String[] args ) {
        SpringApplication.run(EurekaApplication.class,args);
    }
}

application.yml

server:
  port: 8761

eureka:
  instance:
    hostname: localhost
  client:
    registerWithEureka: false
    fetchRegistry: false
    serverUrl:
      defaultZone: http://localhost:${server.port}/eureka/

spring.cloud.config.discovery.enabled: true

0 个答案:

没有答案