What am I doing wrong? I\'m using this little standalone App which runs and finds my src/main/resources/config/application.yml
. The same configuration doesn\'t work
Unit test with Spring Boot 2
spring boot 2 support 'application.properties' by default, for 'application.yml' just add below:
@TestPropertySource(properties = { "spring.config.location=classpath:application.yml" })
e.g.
@RunWith(SpringRunner.class)
@SpringBootTest
@TestPropertySource(properties = { "spring.config.location=classpath:application.yml" })
public class ServiceTest {...}