H2 数据库体验

http://dingm.iteye.com/blog/1489895

H2数据库指定数据库文件路径 

 When using database URLs like jdbc:h2 :~/test, the database is stored in the user directory . For Windows, this is usually "C:\Documents and Settings\<userName>". If the base directory is not set (as in jdbc:h2 :test), the database files are stored in the directory where the application is started (the current working directory ).

如果不指定H2的数据库文件输出到"C:\Documents and Settings\<userName>",如果你想让数据库文件输出到你指定的文件夹就设置URLs= jdbc:h2 :F:/h2/test。就是在URLs里面设置输出文件夹。 

原文地址:https://www.cnblogs.com/passer1991/p/2783828.html