I have a spring MVC configuration class like this:
@Configuration
@EnableWebMvc
public class WebConfig extends WebMvcConfigurerAdapter{
@Bean
public InternalResourceViewResolver configureInternalResourceViewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/views/");
resolver.setSuffix(".jsp");
return resolver;
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**").addResourceLocations(
"/resources/");
}
}
I have an issue with maping URLs with a trailing slash,similar to this. so i want to add RequestMappingHandlerMapping
class, but based on the instruction i get there i need to extend WebMvcConfigurationSupport
class and implement requestMappingHandlerMapping()
method, but unfortunatly i have already extended WebMvcConfigurationSupport class for resource's mapping. Is there any way i could add requiest mapping handler to my class?
NOTE: i am using Spring version 3.1.1.RELEASE