I m using H2 with Hibernate to generate in-memory DB on the fly for unit-testing. I managed to create the DB successfully, and everything is working ok. But I have an issue I don t know how to approach. I need to load reference data to the DB for testing prior to the execution of the tests. I have this data sored as a SQL insert s file which I need to run only once in real time envirnemnt, however, because the DB is generated every time from scratch I need to figure out how to insert the data on runtime. The data is quite simple, it s countries lists, states list, etc. Whats the best way to do it ?
b 以前,所有工作都在春季框架下进行。