My active profiles work fine if I install them as VM args.
I have a test that I want to use @ActiveProfiles("local").
Here is the annotation I'm using:
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/jpaContext.xml")
@ActiveProfiles("local")
public class MyServiceTest {
When I try to run, I get the following in my trace:
Caused by: java.io.FileNotFoundException: class path resource [properties/database-configuration-${spring.profiles.active}.properties] cannot be opened because it does not exist
Any thoughts on why this value is not being used?
source
share