Spring Cloud Configuration Server not working with local properties file

后端 未结 9 2180
渐次进展
渐次进展 2020-12-05 07:43

I have been playing around with the Spring Cloud project on github located here: https://github.com/spring-cloud/spring-cloud-config

However I have been running into

9条回答
  •  天命终不由人
    2020-12-05 08:43

    I had the same issue on my local machine, but it works fine on my remote server.

    @Oreste's answer does work for me. So I checked the error log again, And I found

     2018-06-25 16:09:49.789  INFO 4397 --- [           main] t.p.a.s.api.user.UserServiceApplication  : The following profiles are active:  someProfileISetBefore
    

    So, the root reason for my case is I set an environment variable before, but I forget to remove it. And it overrides the application properties files config.

    Hope you guys won't make the silly mistake like me. Fixed by:

     unset spring_profiles_active 
    

提交回复
热议问题