score:4

Accepted answer

Something like this should work:

@Bean public DefaultAnnotationHandlerMapping defaultAnnotationHandlerMapping(){
        DefaultAnnotationHandlerMapping bean = new DefaultAnnotationHandlerMapping();
        bean.setUseDefaultSuffixPattern(false);
        return bean;
    }

You can see my sample spring MVC app using code config here https://github.com/robhinds/spring-code-configuration-webapp/blob/master/src/main/java/com/tmm/web/configuration/WebMvcConfiguration.java


Related Query

More Query from same tag