没有获取到配置文件No active profile set, falling back to default profiles: default

来源:6-3 Config Client

weixin_慕尼黑2067412

2019-08-09

报错信息:

2019-08-09 18:42:53.087  INFO 4084 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://luanjie:8080/
2019-08-09 18:42:54.776  INFO 4084 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=order, profiles=[dev], label=null, version=9832cdfe622704393dc365a862405160975bcc07, state=null
2019-08-09 18:42:54.777  INFO 4084 --- [           main] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource [name='configService', propertySources=[MapPropertySource [name='configClient'], MapPropertySource [name='https://gitee.com/springcload/config.git/order-dev.yml'], MapPropertySource [name='https://gitee.com/springcload/config.git/order.yml']]]
2019-08-09 18:42:54.785  INFO 4084 --- [           main] com.luaj.order.OrderApplication          : No active profile set, falling back to default profiles: default
2019-08-09 18:42:54.812  INFO 4084 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3968bc60: startup date [Fri Aug 09 18:42:54 CST 2019]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@6f46426d
2019-08-09 18:42:55.802 ERROR 4084 --- [           main] o.s.boot.SpringApplication               : Application startup failed

bootstrap.yml:

spring:
  application:
    name: order
  cloud:
    config:
      discovery:
        enabled: true
        service-id: CONFIG
      profile: dev
eureka:
  instance:
    prefer-ip-address: true

![![图片描述
图片描述
单独访问是可以的 config也注册上了

写回答

1回答

廖师兄

2019-08-10

Config项目里的appkication.yml是怎么写的,为什么注册到eureka上显示luanjie

0
12
廖师兄
回复
weixin_慕尼黑2067412
应该显示内网ip才对啊,你是运行在docker里?
2019-08-12
共12条回复

SpringCloud Finchley(M2+RELEASE+SR2)微服务实战

SpringCloud组件实现微服务,【已升级Finchley.Release】

5674 学习 · 2489 问题

查看课程