From e15e45b5e2333b0bae26f2e5a16910f0d61d3212 Mon Sep 17 00:00:00 2001 From: Cyrille Le Clerc <cyrille@cyrilleleclerc.com> Date: Sat, 10 Aug 2013 19:49:01 +0200 Subject: [PATCH] Spring MVC should server static resources (*.html, ...) located in src/main/webapp instead of returning "404 Not Found" --- src/main/resources/spring/mvc-core-config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/resources/spring/mvc-core-config.xml b/src/main/resources/spring/mvc-core-config.xml index 426f123..170fbdb 100644 --- a/src/main/resources/spring/mvc-core-config.xml +++ b/src/main/resources/spring/mvc-core-config.xml @@ -33,6 +33,9 @@ <mvc:view-controller path="/" view-name="welcome" /> + <!-- serve static resources (*.html, ...) from src/main/webapp/ --> + <mvc:default-servlet-handler/> + <bean id="conversionService" class="org.springframework.format.support.FormattingConversionServiceFactoryBean"> <property name="formatters"> <set> -- GitLab