I'm using Spring 4 and I've a JUnit test which uses jdbc template to persist data to an sqlite 3 database (which is essentially a file in my case called test.db on the file system). My test works fine and does persist to the database file successfully.
I'm using Maven to build and when I run my Junit test it creates the test.db file in the root folder of the project (i.e. in the same directory where the pom.xml file is). I would like to ensure this file gets created in the target/ directory instead and referenced in there.
Is there a way in a spring test that i can tell spring where to "create" this test.db file?
Any help would be great - Thanks Ro
Aucun commentaire:
Enregistrer un commentaire