Data Access Service 를 적용해서 데이터를 입력,수정,삭제,조회 한다.
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="net.sf.log4jdbc.DriverSpy"/> <property name="url" value="jdbc:log4jdbc:hsqldb:hsql://localhost/cvpldb"/> <property name="username" value="sa"/> <property name="password" value=""/> <property name="defaultAutoCommit" value="false"/> <property name="poolPreparedStatements" value="true"/> </bean>
<!-- SqlMap setup for iBATIS Database Layer --> <bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"> <property name="configLocation" value="classpath:/sqlmap/egov-sql-map-config.xml"/> <property name="dataSource" ref="dataSource"/> </bean>
<sqlMapConfig> <!-- Hsql DB --> <sqlMap resource="sqlmap/rte/egov-cvpl-cmmn.mapping_Hsql.xml"/> <sqlMap resource="sqlmap/rte/egov-cvpl-cnslt.mapping_Hsql.xml"/> <sqlMap resource="sqlmap/rte/egov-cvpl-user.mapping_Hsql.xml"/> <sqlMap resource="sqlmap/rte/egov-cvpl-faq.mapping_Hsql.xml"/> </sqlMapConfig>