Commit b7ed5bbc authored by Dave Syer's avatar Dave Syer

Revert "Temporary fix for Spring snapshot changes"

This reverts commit 8a804f61.
parent d4d9ebca
...@@ -175,14 +175,14 @@ public class WebMvcAutoConfiguration { ...@@ -175,14 +175,14 @@ public class WebMvcAutoConfiguration {
@Override @Override
public void addResourceHandlers(ResourceHandlerRegistry registry) { public void addResourceHandlers(ResourceHandlerRegistry registry) {
// FIXME: re-instate this when Spring is updated 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(
registry.addResourceHandler("/**").addResourceLocations(RESOURCE_LOCATIONS); 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;
...@@ -102,8 +101,6 @@ public class WebMvcAutoConfigurationTests { ...@@ -102,8 +101,6 @@ public class WebMvcAutoConfigurationTests {
} }
@Test @Test
@Ignore
// FIXME: re-instate when Spring is back to normal
public void resourceHandlerMappingOverrideWebjars() throws Exception { public void resourceHandlerMappingOverrideWebjars() throws Exception {
this.context = new AnnotationConfigEmbeddedWebApplicationContext(); this.context = new AnnotationConfigEmbeddedWebApplicationContext();
this.context.register(WebJars.class, Config.class, WebMvcAutoConfiguration.class); this.context.register(WebJars.class, Config.class, WebMvcAutoConfiguration.class);
...@@ -115,8 +112,6 @@ public class WebMvcAutoConfigurationTests { ...@@ -115,8 +112,6 @@ public class WebMvcAutoConfigurationTests {
} }
@Test @Test
@Ignore
// FIXME: re-instate when Spring is back to normal
public void resourceHandlerMappingOverrideAll() throws Exception { public void resourceHandlerMappingOverrideAll() throws Exception {
this.context = new AnnotationConfigEmbeddedWebApplicationContext(); this.context = new AnnotationConfigEmbeddedWebApplicationContext();
this.context.register(AllResources.class, Config.class, this.context.register(AllResources.class, Config.class,
......
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