'eclipse is not using application.yml

application.yml

server:
   port: 9001

application.properties

server.port= 9001

code works when I use .properties file but when I am using .yml file no properties are set and it runs on default port 8080. kindly help me with this issue



Solution 1:[1]

Application.yml is required to be on root of your application. So it seems eclipse is not finding it on root. Try changing the working directory in your eclipse run configuration. For example it can be /target/classes

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 inchu55