티스토리 뷰
반응형
pom.xml
<!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.192</version>
</dependency>
dataSource.xml
<!-- h2 database 선언 -->
<jdbc:embedded-database id="dataSource" type="H2">
<jdbc:script location="classpath:egovframework/db/user.sql" />
<jdbc:script location="classpath:egovframework/db/menu.sql" />
<jdbc:script location="classpath:egovframework/db/menu_detail.sql" />
<jdbc:script location="classpath:egovframework/db/user_authority.sql" />
</jdbc:embedded-database>
h2 console 설정
http://www.h2database.com/html/quickstart.html#h2_console <-- h2 console 화면
interceptor 가 적용 중이라면 '/console/**' url pattern을 exclude 시켜줘야된다.
h2 database url : jdbc:h2:mem:dataSource
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 -->
반응형
'Web Development > Spring' 카테고리의 다른 글
log4j 설정 (0) | 2016.10.27 |
---|---|
Spring DataSource Query Logging (0) | 2016.10.27 |
Spring Transaction (0) | 2016.10.27 |
@PreConstruct, @PostConstruct (0) | 2016.10.27 |
Spring interceptor request.setAttribute 전달 (0) | 2016.10.27 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- MyBatis 팁
- java 압축 풀기
- JSTL
- mybatis Merge
- spring ExcelView
- 코루틴
- java 폴더구조 구하기
- jstl 커스텀 태그
- coroutine
- POI EXCEL
- java calendar
- Database#transaction
- jstl split
- java 설치
- jstl foreach
- 전자정부프레임워크 tiles
- github image 첨부시 주의할점
- spring property
- Kotlin
- java 특정문자 갯수구하기
- JSP 세션
- java 설정
- POE Excel 만들기
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
글 보관함