Spring’s embedded H2 datasource and DB_CLOSE_ON_EXIT
问题 For unit tests (call them integration tests if you want) I have configured an embedded database in my Spring config like so: <jdbc:embedded-database id="dataSource" type="H2"> <jdbc:script location="classpath:schema_h2.sql" /> </jdbc:embedded-database> Now, when running the tests from the command line, they work fine, but I get some errors at the end (harmless, but irritating): WARN 2013-03-25 12:20:22,656 [Thread-9] o.s.j.d.e.H2EmbeddedDatabaseConfigurer 'Could not shutdown embedded database