赞助

eureka注册中心wro.css wro.js 404

注册中心和配置中心放在一个module里面,如果不配置配种中心的访问前缀,会被config拦截。所以改动如下:

package com.cloud.stagging.lhcloudeureka;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

@EnableConfigServer
@EnableEurekaServer
@SpringBootApplication
public class LhCloudEurekaApplication {

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

}

  这是启动类,要么将

@EnableConfigServer 去掉即可正常访问。

要么在配置中心的配置增加访问前缀,如:
spring.cloud.config.server.prefix: /config
即可


原文:https://blog.csdn.net/speak_12/article/details/81945738




posted @ 2019-07-11 13:55  念念不忘、  阅读(1102)  评论(0编辑  收藏  举报