質問編集履歴

1

Fileに書かれていた設定ファイルを記述するの見落としてました。

2018/02/12 14:02

投稿

matikadokadosan
matikadokadosan

スコア15

test CHANGED
File without changes
test CHANGED
@@ -168,10 +168,52 @@
168
168
 
169
169
  **
170
170
 
171
-
171
+ ---------------------------------
172
+
173
+ JdbcTemplateConfig.xml
172
174
 
173
175
  -------------------------------------------------------------------------
174
176
 
177
+ <?xml version="1.0" encoding="UTF-8"?>
178
+
179
+ <beans xmlns="http://www.springframework.org/schema/beans"
180
+
181
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
182
+
183
+ xmlns:context="http://www.springframework.org/schema/context"
184
+
185
+ xsi:schemaLocation="
186
+
187
+ http://www.springframework.org/schema/beans
188
+
189
+ http://www.springframework.org/schema/beans/spring-beans.xsd
190
+
191
+ http://www.springframework.org/schema/context
192
+
193
+ http://www.springframework.org/schema/context/spring-context.xsd">
194
+
195
+
196
+
197
+ <import resource="classpath:datasource-application.xml" />
198
+
199
+
200
+
201
+ <context:component-scan base-package="com.example.dao"/>
202
+
203
+
204
+
205
+ <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
206
+
207
+ <property name="dataSource" ref="dataSource"/>
208
+
209
+ </bean>
210
+
211
+
212
+
213
+ </beans>
214
+
215
+ -------------------------
216
+
175
217
  application.xml
176
218
 
177
219
  -------------------------------------------------------------------------