I have several beans using @Value annotion in my project.
If I don't use @ActiveProfiles and run test with config below,everything is fine.
spring:
profiles:
active: localhost,schedule_off
But if I use @ActiveProfiles,there would be exception says
'Could not resolve placeholder XXX'.
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles("localhost,schedule_off")
Why is that and how to fix it?