application.yml文件
server:
port: 8888
spring:
cloud:
config:
server:
native:
search-locations: classpath:/config
application:
name: mediaconfig
profiles:
active: native
eureka:
client:
service-url:
defaultZone: http://127.0.0.1:8761/eureka
启动类
@SpringBootApplication
@EnableConfigServer
@EnableEurekaClient
public class ConfigApplication {
public static void main(String[] args) {
SpringApplication.run(ConfigApplication.class, args);
}
}
没有注册到注册中心