You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new support for running local application instances supported by Testcontainers based services suggests the creation of a secondary application bootstrap class in src/test/java pointing to the original one but including additional configuration. The proposed way to bootstrap such a class is through SpringApplication.from(…) returning an Augmented instance.
As that class is becoming the central bootstrap mechanism for local development, it would be nice to be able to make sure the application is always run with a dedicated profile. Especially, without having to explicitly pass it into the application either via command line arguments or a dedicated launch configuration in the IDE. Something along the lines of:
philwebb
changed the title
Allow SpringApplication.Augmented to get active profiles configured
Allow the configuration of active profiles in SpringApplication.Augmented
Aug 2, 2023
Stumbling upon this, I found a possible workaround to OP by adding a program argument --spring.profiles.active=some-profile to the call of Augmented. Something like this:
The new support for running local application instances supported by Testcontainers based services suggests the creation of a secondary application bootstrap class in
src/test/java
pointing to the original one but including additional configuration. The proposed way to bootstrap such a class is throughSpringApplication.from(…)
returning anAugmented
instance.As that class is becoming the central bootstrap mechanism for local development, it would be nice to be able to make sure the application is always run with a dedicated profile. Especially, without having to explicitly pass it into the application either via command line arguments or a dedicated launch configuration in the IDE. Something along the lines of:
The text was updated successfully, but these errors were encountered: