Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
[ch07] Applied EmbeddedDbSqlRegistry on SqlService.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhsim86 authored and Dongho Sim committed Oct 28, 2017
1 parent 869443f commit 21f9ccd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main/resources/applicationContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.3.xsd">
http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
http://www.springframework.org/schema/jdbc
http://www.springframework.org/schema/jdbc/spring-jdbc-4.3.xsd">

<tx:annotation-driven/>
<context:annotation-config/>
Expand Down Expand Up @@ -50,9 +53,14 @@
<property name="contextPath" value="ch07.springbook.sql.reader.jaxb" />
</bean>

<bean id="sqlRegistry" class="ch07.springbook.sql.registry.ConcurrentHashMapSqlRegistry">
<bean id="sqlRegistry" class="ch07.springbook.sql.registry.EmbeddedDbSqlRegistry">
<property name="dataSource" ref="embeddedDatabase" />
</bean>

<jdbc:embedded-database id="embeddedDatabase" type="HSQL" >
<jdbc:script location="classpath:sql/embedded/schema.sql" />
</jdbc:embedded-database>

<!--
<bean id="sqlService" class="ch07.springbook.sql.SimpleSqlService">
<property name="sqlMap">
Expand Down

0 comments on commit 21f9ccd

Please sign in to comment.