0
    @ExtendWith(SpringExtension.class)
@WebMvcTest(MyClass.class)
@TestPropertySource(locations="classpath:application-test.yml")

//Something like this?

Murugan
  • 51
  • 6

1 Answers1

0

This should still able to find the properties in the test file in your application:

@Autowired
private Environment env;

// Load data
String data = env.getProperty("some.property")
enzo
  • 9,861
  • 3
  • 15
  • 38
eyoeldefare
  • 2,136
  • 1
  • 15
  • 25