Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong example given at section 17.4 Handler mappings [SPR-13832] #18405

Closed
spring-projects-issues opened this issue Dec 30, 2015 · 1 comment
Closed
Assignees
Labels
status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Dec 30, 2015

Constantino Cronemberger opened SPR-13832 and commented

The example given at:

http://docs.spring.io/spring/docs/3.2.16.RELEASE/spring-framework-reference/htmlsingle/#mvc-handlermapping

Does not work.

I had to remove the id from the bean declaration for it to work:

<beans>
<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping">
<property name="interceptors">
<bean class="example.MyInterceptor"/>
</property>
</bean>
<beans>


Affects: 3.2.16

Backported to: 3.2.17

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Dec 30, 2015

Juergen Hoeller commented

Indeed, in order for that custom bean to override the default RequestMappingHandlerMapping bean, there should be no id specified. However, that's just for a scenario with <mvc:annotation-driven> / @EnableWebMvc present; without those declared, the explicit id in the example should not make a difference.

In any case, I've adapted the example accordingly.

Juergen

@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches type: documentation A documentation task labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.2.5 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

2 participants