My Active profiles are working normally if I set them as VM args.
I've got a test with which I want to use @ActiveProfiles("local")
.
Here are the class annotation's 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?