lundi 2 mars 2015

Maven integration test not working with Spring

I am running a database integration test on my current project. I am using maven currently for it. When I run the test some values are not being loaded from my properties files. To load the properties I am using



@PropertySource("classpath:foo.properties)


I am also using thymeleaf to get the values.



@Value("${fieldsToSetString}")
private String fieldsToSetString;


I believe the issue is that from the tests maven doesn't know that I am using Spring because I am using annotations rather than a traditional web.xml so it does not run my Application.class which specifies that I am using Spring. So maven isn't recognizing the @PropertySource annotation. Anyone know how to solve this issue so that the annotation can be resolved while running the integration test?


Aucun commentaire:

Enregistrer un commentaire