Hi I am using Spring Boot, I want to inject the values of the .yml file in the Bean. I have written the integration test case but looks like via Integration test case it not
If you have 'application-test.yml' in resources folder.
You can try this:
import org.springframework.test.context.ActiveProfiles;
@ActiveProfiles("test")
From it's Java Docs:
* {@code ActiveProfiles} is a class-level annotation that is used to declare
* which active bean definition profiles should be used when loading
* an {@link org.springframework.context.ApplicationContext ApplicationContext}
* for test classes.
*
* As of Spring Framework 4.0, this annotation may be used as a
* meta-annotation to create custom composed annotations.