Hello,
It doesn't matter is your app Boot or just raw Spring. There is just enough to inject org.springframework.core.env.Environment to your bean.
@Autowired
private Environment environment;
....
this.environment.getActiveProfiles();
Hope this is helpfull!!
Get your Spring Framework Certification today and become certified.
Thanks!