Skip to content
Snippets Groups Projects
Commit 73a3e385 authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Disable suffix based matching for content negotiation

This was causing issues with aliases containing dots.
parent e21fc3f5
Branches
No related merge requests found
...@@ -62,6 +62,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; ...@@ -62,6 +62,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; import org.springframework.web.servlet.config.annotation.ViewResolverRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
...@@ -141,6 +142,11 @@ public class AppConfig implements WebMvcConfigurer { ...@@ -141,6 +142,11 @@ public class AppConfig implements WebMvcConfigurer {
configurer.defaultContentTypeStrategy(strategy); configurer.defaultContentTypeStrategy(strategy);
} }
@Override
public void configurePathMatch(final PathMatchConfigurer configurer) {
configurer.setUseSuffixPatternMatch(false);
}
@Override @Override
public void configureViewResolvers(ViewResolverRegistry registry) { public void configureViewResolvers(ViewResolverRegistry registry) {
registry.viewResolver(new InternalResourceViewResolver()); registry.viewResolver(new InternalResourceViewResolver());
......
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