How do you get current active/default Environment profile programmatically in Spring?

You can autowire the Environment

@Autowired
Environment env;

Environment offers:

Leave a Comment