質問編集履歴

1

mvc-config\.xmlを提示

2017/04/13 09:38

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -79,3 +79,141 @@
79
79
 
80
80
 
81
81
  お忙しいところ申し訳ありませんがご教授願えませんでしょうか。
82
+
83
+
84
+
85
+ 追記:
86
+
87
+ servlet-context.xmlがなかったのですが、中身から判断して
88
+
89
+ mvc-config.xmlを記載しておきます。
90
+
91
+ ```xml
92
+
93
+ <?xml version="1.0" encoding="UTF-8"?>
94
+
95
+
96
+
97
+ <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
98
+
99
+ xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context"
100
+
101
+ xmlns:tx="http://www.springframework.org/schema/tx"
102
+
103
+ xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
104
+
105
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
106
+
107
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
108
+
109
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
110
+
111
+
112
+
113
+ <!-- Uncomment and your base-package here:
114
+
115
+ <context:component-scan
116
+
117
+ base-package="org.springframework.samples.web"/> -->
118
+
119
+
120
+
121
+
122
+
123
+ <mvc:annotation-driven />
124
+
125
+ <mvc:resources mapping="/css/**" location="/WEB-INF/css/" />
126
+
127
+ <mvc:resources mapping="/js/**" location="/WEB-INF/js/" />
128
+
129
+ <context:component-scan base-package="cx.myhome.*********"/>
130
+
131
+ <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
132
+
133
+ <!-- Example: a logical view name of 'showMessage' is mapped to '/WEB-INF/jsp/showMessage.jsp' -->
134
+
135
+ <property name="prefix" value="/WEB-INF/view/"/>
136
+
137
+ <property name="suffix" value=".jsp"/>
138
+
139
+ </bean>
140
+
141
+ <tx:annotation-driven />
142
+
143
+ </beans>
144
+
145
+
146
+
147
+ ```
148
+
149
+ トランザクションマネージャの設定の記述があるのは
150
+
151
+ application-config.xmlでした。
152
+
153
+ ```xml
154
+
155
+ <?xml version="1.0" encoding="UTF-8"?>
156
+
157
+
158
+
159
+ <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
160
+
161
+ xmlns:context="http://www.springframework.org/schema/context"
162
+
163
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
164
+
165
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
166
+
167
+
168
+
169
+ <!-- Uncomment and add your base-package here:
170
+
171
+ <context:component-scan
172
+
173
+ base-package="org.springframework.samples.service"/> -->
174
+
175
+ <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
176
+
177
+ <property name="driverClassName" value="com.mysql.jdbc.Driver" />
178
+
179
+ <property name="url" value="jdbc:mysql://localhost:3306/test" />
180
+
181
+ <property name="username" value="****" />
182
+
183
+ <property name="password" value="****" />
184
+
185
+ </bean>
186
+
187
+
188
+
189
+ <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
190
+
191
+ <property name="dataSource" ref="dataSource"/>
192
+
193
+ </bean>
194
+
195
+
196
+
197
+ <bean id="connectionProvider" class="jp.sf.amateras.mirage.integration.spring.SpringConnectionProvider">
198
+
199
+ <property name="transactionManager" ref="transactionManager" />
200
+
201
+ </bean>
202
+
203
+
204
+
205
+ <bean id="dialect" class="jp.sf.amateras.mirage.dialect.MySQLDialect" />
206
+
207
+
208
+
209
+ <bean id="sqlManager" class="jp.sf.amateras.mirage.SqlManagerImpl">
210
+
211
+ <property name="connectionProvider" ref="connectionProvider" />
212
+
213
+ <property name="dialect" ref="dialect" />
214
+
215
+ </bean>
216
+
217
+ </beans>
218
+
219
+ ```