質問編集履歴

1

ApplicationContext.xmlを追加いたしました。

2017/09/27 01:03

投稿

xxxAIxxx
xxxAIxxx

スコア13

test CHANGED
File without changes
test CHANGED
@@ -410,24 +410,62 @@
410
410
 
411
411
  ```
412
412
 
413
- ###試したこと
414
-
415
- 課題に対してアプローチしたことを記載してください
413
+ ApplicationContext.xml
416
-
417
-
418
414
 
419
415
  ```xml
420
416
 
417
+ <?xml version="1.0" encoding="UTF-8"?>
418
+
419
+ <beans:beans xmlns="http://www.springframework.org/schema/mvc"
420
+
421
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
422
+
423
+ xmlns:context="http://www.springframework.org/schema/context"
424
+
425
+ xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
426
+
427
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
428
+
429
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
430
+
431
+
432
+
433
+ <annotation-driven />
434
+
435
+
436
+
437
+ <resources mapping="/resources/**" location="/resources/" />
438
+
439
+
440
+
441
+ <beans:bean
442
+
443
+ class="org.springframework.web.servlet.view.InternalResourceViewResolver">
444
+
445
+ <beans:property name="prefix" value="/WEB-INF/echo/" />
446
+
447
+ <beans:property name="suffix" value=".jsp" />
448
+
421
- <properties>
449
+ </beans:bean>
450
+
451
+
452
+
422
-
453
+ <beans:bean id="appProps" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
454
+
455
+ <beans:property name="ignoreResourceNotFound" value="true"/>
456
+
457
+ <beans:property name="locations" value="classpath:app.properties"/>
458
+
459
+ </beans:bean>
460
+
461
+
462
+
423
- <spring-core.version>4.1.6.RELEASE</spring-core.version>
463
+ <context:component-scan base-package="example.app" />
424
-
425
- <spring-webmvc.version>4.1.6.RELEASE</spring-webmvc.version>
464
+
426
-
427
- <spring-test.version>4.1.6.RELEASE</spring-test.version>
465
+
428
-
466
+
429
- </properties>
467
+ </beans:beans>
430
-
468
+
469
+
470
+
431
- ```
471
+ ```
432
-
433
- pom.xmlに記述追加