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
Source: stackoverflow.com
Related Query
- How would I make this bean in JavaConfig, I dont want to use XML with Spring anymore
- Spring Data REST controller must not use @RequestMapping on class level as this would cause double registration with Spring MVC
- how can i use @Transactional and sessionFactory bean in servlet filter with spring
- How can I provide a default bean implementation in Spring MVC with xml configuration?
- How do I use Comet with Spring MVC?
- How to use JasperReports with Spring MVC?
- Spring MVC: How to use a request-scoped bean inside a spawned thread?
- How to write a spring bean with a constructor that contains a list?
- how to use messages with freemarker in spring mvc?
- How do I use @Valid with Spring MVC's @RequestBody parameters?
- How to make Spring MVC controller work with UTF-8?
- How to use annotation validation in Spring with error message gotten from properties file?
- How to use Servlet 3 @WebServlet & async with Spring MVC 3?
- Spring boot, how to use @Valid with List<T>
- How to use placeholder HTML with Spring <form:input> tag on jsp page
- How to use hbase with Spring Boot using Java instead of XML?
- Use Spring Properties in Java with CrossOrigin Annotation or in Spring-Config XML
- How can I turn this 'spring 3.1' oriented junit4 test with SpringJUnit4ClassRunner into a spring oriented junit3.8 based test?
- How to embed Jetty into Spring and make it use the same AppContext it was embedded into?
- How can I use YAML properties with constructor injection in Spring Boot?
- How to use twitter bootstrap with Spring MVC
- How to use Spring Security with Mustache?
- How to inject session scope bean in interceptor using java config with Spring
- How can I use multiple Oauth2 SSO Servers on a single Spring boot application with Spring Cloud Security Oauth2?
- How to use send.redirect() while working with Spring MVC
- How to implement Spring Security 4 with both XML and Java config
- How do I use JAXB annotations with Spring RestTemplate?
- How do you make invalid urls ending in .jsp use the spring 404 page?
- How to make Spring Joda-Time formatter work with nonstandard locales?
- How can I use SimpleFormController with Validator with Spring 3?
More Query from same tag
- Partial response in Spring MVC
- Autowiring fails: Not an managed Type
- Spring MVC Unicode symbols issue
- IllegalArgumentException while using javax.sql.Datasource and hosting the application on Websphere
- Custom Authentication Filters in multiple HttpSecurity objects using Java Config
- HTTP Status 400 – Bad Request - Spring MVC
- SessionFactory bean creation failed (ClassCastException is thrown)
- How to properly create a JavaScript Array of Dates in Spring?
- Sprinv MVC No mapping found for HTTP request with URI
- Spring: java.lang.NoSuchFieldError: IMPORT_BEAN_NAME_GENERATOR
- Error resolving template "pages", template might not exist or might not be accessible by any of the configured Template Resolvers
- Java - How to read xls format data via HTTP request not file
- How to add JSON support with XML already working?
- Difference between @Valid and @Validated in Spring
- can I use the same class of some ViewResolver in spring-mvc two times with different property "order" to resovler the result from controller?
- SQLServer 2008: Stored procedure call from JAVA Returns error when both insert and update statement are executed
- Axios POST request passing an empty object to Spring REST API end doing
- Best way of managing properties in Spring
- select value from child jsp to parent using spring mvc
- Page display using Spring mvc controller appends endpoint to page resources
- java.lang.IllegalStateException: Could not find @PathVariable
- Spring XML View Resolver not working
- update validated value from a record
- Which one is the application server in the given scenario
- Post relational data, Spring JPA REST
- spring mvc requestmapping issues
- Getting form values from outside the form in jsp?
- MultiPartFile deleted too early
- Sprint annotation based 404 handling
- Jquery ajax call will not reach succes function