请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

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

报错信息:

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也注册上了

正在回答 回答被采纳积分+3

1回答

廖师兄 2019-08-10 23:20:01

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

0 回复 有任何疑惑可以回复我~
  • spring:
      application:
        name: config
      cloud:
        config:
          server:
            git:
              uri: https://gitee.com/springcload/config.git
              username: luaj
              password: luanjie123
              basedir: D:\config
    eureka:
      client:
        service-url:
          defaultZone: http://localhost:8761/eureka/
    回复 有任何疑惑可以回复我~ 2019-08-10 23:21:33
  • eureka为什么这么显示我也不知道从哪取的
    回复 有任何疑惑可以回复我~ 2019-08-10 23:22:36
  • 廖师兄 回复 提问者 weixin_慕尼黑2067412 #3
    应该是由于你的电脑有多个网卡导致。你加一个配置。
    eureka:
      instance:
        prefer-ip-address: true
    回复 有任何疑惑可以回复我~ 2019-08-10 23:24:45
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号