I have a problem and I can't load a YML in the main tests. I currently have an application.yml in the src > main > resources > config > application.yml
path and I want it to take the src > test > resources > config > application-test.yml
I already tried using @ActiveProfiles("test")
, but take the main route. I also tried @Profile("test")
but it does nothing different.
I also tried simply to create the application.yml in the path src > test > resources > config > application.yml
Also put the annotation:
@SpringBootTest(
properties = ["spring.profiles.active=test"],
classes = Application.class,
)
Anyone knows how to solve this?