I have a spring boot application with configuation like this:
src/main/resources/application.yml:
eureka:
client:
serviceUrl:
defaultZone: http://10.254.102.12:1111/eureka/
In my unit test cases, I want to set eureka instance name and change the logging level. src/test/resources/application.yml:
eureka:
instance:
appname: item-client-test
logging:
level: debug
But when I added these additional settings those former settings seems to not work any more. The eureka serviceUrl fallback to default loclahost:8761, so my test failed. When I added my custom eureka serviceUrl to src/test/resources/application.yml
, my test goes well.
So I am confused about is this a bug of spring boot or I was not using the right way for my configuration?