I use Spring Boot. Tell me how to "tell" the application to run in "dev" or "prodaction" mode. There is a reason to go so far - in dev you need to omit the user authorization process. I assume that you need some external configuration file, runtime parameter, or maybe there is something specific for Spring Boot? Tell me the best option and can eat where to peep the solution.

1 answer 1

As noted here , you can activate configurations depending on the active profile through the @Profile annotation.

Excerpt from JavaDoc:

If you’re online, you’ll be active.

Accordingly, you need to specify the profile in this annotation and initialize the bins in a profile-specific way.