Skip to content

Update documentation with example of single ApplicationContext per webapp [SPR-11703] #16325

@spring-projects-issues

Description

@spring-projects-issues

Oleksandr Gavenko opened SPR-11703 and commented

If read docs there are no info about where allowed to put mvc:annotation-driven annotation (in application context config vs servlet context).

There are some question on StackOverflow and Spring Forum about this.

http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd

http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd

have text: Configures the annotation-driven Spring MVC Controller programming model. Note that, with Spring 3.0, this tag works in Servlet MVC only!

And for String 3.2.5 - @RequestHandler is not mapped if mvc:annotation-driven put to servlet context config . But I look to latest petclinic:

https://github.com/spring-projects/spring-petclinic/blob/master/src/main/resources/spring/mvc-core-config.xml

https://github.com/spring-projects/spring-petclinic/blob/master/src/main/webapp/WEB-INF/web.xml

and seems that mvc:annotation-driven now allowed in servlet context!

So as minimum comment in http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd should be fixed.

And as maximum this behavior should be documented in http://docs.spring.io/spring/docs/4.0.3.RELEASE/spring-framework-reference/htmlsingle/#mvc-config-enable


Affects: 4.0.3

Issue Links:

Referenced from: commits 59a050f, 80cb0c4

0 votes, 7 watchers

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions