Spring-boot utilizes Spring profiles which allow for instance to have separate config for different environments. One way I use this feature is to configure test database to be used by integration tests. I wonder however is it necessary to create my own profile 'test' and explicitly activate this profile in each test file? Right now I do it in the following way:
Create application-test.properties inside src/main/resources
Write test specific config there (just the database name for now)
In every test file include:
@ActiveProfiles("test")
Is there a smarter / more concise way? For instance a default test profile?
Edit 1: This question pertains to Spring-Boot 1.4.1