I\'m using a spring boot app which runs my src/main/resources/config/application.yml.
When I run my test case by :
@RunWith(SpringJUnit4ClassRunner.c
Lu55 Option 1 how to...
Add test only application.yml inside a seperated resources folder.
├── main
│ ├── java
│ └── resources
│ ├── application.yml
└── test
├── java
└── resources
└── application.yml
In this project structure the application.yml under main is loaded if the code under main is running, the application.yml under test is used in a test.
To setup this structure add a new Package folder test/recources if not present.
Eclipse right click on your project -> Properties -> Java Build Path -> Source Tab -> (Dialog ont the rigth side) "Add Folder ..."
Inside Source Folder Selection -> mark test -> click on "Create New Folder ..." button -> type "resources" inside the Textfeld -> Click the "Finish" button.
After pushing the "Finisch" button you can see the sourcefolder {projectname}/src/test/recources (new)
Optional: Arrange folder sequence for the Project Explorer view.
Klick on Order and Export Tab mark and move {projectname}/src/test/recources to bottom.
Apply and Close
!!! Clean up Project !!!
Eclipse -> Project -> Clean ...
Now there is a separated yaml for test and the main application.