Commit e5e511fd authored by Andy Wilkinson's avatar Andy Wilkinson

Reinstate use of hasMappingForPattern

Use of hasMappingForPattern was commented out during work on the
Aether-based Grape implementation as it was temporarily removed in 
Spring 4's snapshots. It's since been reinstated in the snapshots, so
its use should have been reinstated prior to merging Aether work into
master.
parent da748656
...@@ -175,13 +175,14 @@ public class WebMvcAutoConfiguration { ...@@ -175,13 +175,14 @@ public class WebMvcAutoConfiguration {
@Override @Override
public void addResourceHandlers(ResourceHandlerRegistry registry) { public void addResourceHandlers(ResourceHandlerRegistry registry) {
// if (!registry.hasMappingForPattern("/webjars/**")) { if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations( registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/"); "classpath:/META-INF/resources/webjars/");
// } }
// if (!registry.hasMappingForPattern("/**")) { if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(RESOURCE_LOCATIONS); registry.addResourceHandler("/**").addResourceLocations(
// } RESOURCE_LOCATIONS);
}
} }
@Override @Override
......
...@@ -25,7 +25,6 @@ import javax.servlet.http.HttpServletRequest; ...@@ -25,7 +25,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.After; import org.junit.After;
import org.junit.Ignore;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;
...@@ -57,7 +56,6 @@ import static org.junit.Assert.assertThat; ...@@ -57,7 +56,6 @@ import static org.junit.Assert.assertThat;
* @author Phillip Webb * @author Phillip Webb
* @author Dave Syer * @author Dave Syer
*/ */
@Ignore
public class WebMvcAutoConfigurationTests { public class WebMvcAutoConfigurationTests {
private static final MockEmbeddedServletContainerFactory containerFactory = new MockEmbeddedServletContainerFactory(); private static final MockEmbeddedServletContainerFactory containerFactory = new MockEmbeddedServletContainerFactory();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment