質問編集履歴
1
web.xml
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
#現状
|
2
2
|
|
3
|
-
『Spring Framework5-プログラミング入門-』掌田津耶乃 を用いてSpringを学習中なのですが、Bean構成クラスを作成し、ページを開いたところ404がでました。
|
3
|
+
『Spring Framework5-プログラミング入門-』掌田津耶乃 を用いてSpringを学習中なのですが、Bean構成クラスを作成し、web.xmlを変更してページを開いたところ404がでました。
|
4
4
|
|
5
5
|
ご教授よろしくお願いします。
|
6
|
+
|
7
|
+
|
6
8
|
|
7
9
|
###サーブレット
|
8
10
|
|
@@ -148,33 +150,11 @@
|
|
148
150
|
|
149
151
|
```
|
150
152
|
|
151
|
-
###web.xml
|
153
|
+
###web.xml変更前
|
152
154
|
|
153
155
|
```
|
154
156
|
|
155
|
-
<context-param>
|
156
157
|
|
157
|
-
<param-name>contextClass</param-name>
|
158
|
-
|
159
|
-
<param-value>
|
160
|
-
|
161
|
-
org.springframework.web.context.support.AnnotationConfigWebApplicationContext
|
162
|
-
|
163
|
-
</param-value>
|
164
|
-
|
165
|
-
</context-param>
|
166
|
-
|
167
|
-
<context-param>
|
168
|
-
|
169
|
-
<param-name>contextConfigLocation</param-name>
|
170
|
-
|
171
|
-
<param-value>mysample1.MyBeanConfig</param-value>
|
172
|
-
|
173
|
-
</context-param>
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
<!--
|
178
158
|
|
179
159
|
<context-param>
|
180
160
|
|
@@ -184,6 +164,32 @@
|
|
184
164
|
|
185
165
|
</context-param>
|
186
166
|
|
187
|
-
|
167
|
+
|
188
168
|
|
189
169
|
```
|
170
|
+
|
171
|
+
###web.xml変更後
|
172
|
+
|
173
|
+
```
|
174
|
+
|
175
|
+
<context-param>
|
176
|
+
|
177
|
+
<param-name>contextClass</param-name>
|
178
|
+
|
179
|
+
<param-value>
|
180
|
+
|
181
|
+
org.springframework.web.context.support.AnnotationConfigWebApplicationContext
|
182
|
+
|
183
|
+
</param-value>
|
184
|
+
|
185
|
+
</context-param>
|
186
|
+
|
187
|
+
<context-param>
|
188
|
+
|
189
|
+
<param-name>contextConfigLocation</param-name>
|
190
|
+
|
191
|
+
<param-value>mysample1.MyBeanConfig</param-value>
|
192
|
+
|
193
|
+
</context-param>
|
194
|
+
|
195
|
+
```
|