In my Spring Boot application, I have two properties files. One is located in src/main/resources/application.properties and the other properties file is in src/test/resources/application.properties.
Whenever I add a property to the main property file, I also have to add it to the test property file or the app will not boot.
Is there a way to make the main application.properties automatically apply to the test context so that I can only override the properties which are different for the test context?
For the test context, the only real different properties are for the database connection and the rest of the properties should be the same as the main context.
I did try creating a src/main/resources/application-test.properties and deleting the src/test/resources/application.properties but the app would not start with an error about properties not being found.