lundi 13 mars 2017

Cannot overrid Spring-Boot application properties in Junit Test

I am trying override application properties, file is here: test/resources/test.properties

@TestPropertySource(locations="classpath:test.properties")
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
@WebAppConfiguration
public abstract class ApplicationAbstractTest {

But when I run any tests - they look for applicaton properties (and don't see VM options app.conf):

@PropertySource(value = "file:${app.conf}")
@SpringBootApplication
public class Application {

How correctly config this?

Aucun commentaire:

Enregistrer un commentaire