check spring profile in java code code example Example: spring environment get active profiles @ActiveProfiles("dev")