http://devjms.tistory.com/105
pom.xml
<!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.192</version>
</dependency>
application-properties.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>application-properties</comment>
<!-- Database -->
<entry key="database.driverClassName">org.h2.Driver</entry>
<entry key="database.url">jdbc:h2:~/apps/h2db/crm;FILE_LOCK=NO</entry>
<entry key="database.username">sa</entry>
<entry key="database.password"></entry>
</properties>
또는
url=jdbc:h2:~/apps/h2db/crm;AUTO_SERVER=TRUE
web.xml
<!-- h2 console -->
<servlet>
<servlet-name>H2Console</servlet-name>
<servlet-class>org.h2.server.web.WebServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>H2Console</servlet-name>
<url-pattern>/console/*</url-pattern>
</servlet-mapping> <!-- h2 console end -->
댓글 ( 4)
댓글 남기기