Our handler methods and Spring MVC implementations use only a small portion of the Spring MVC framework. There will be scenarios that the real-world applications encounter that have not been covered in this chapter. These include requirements such as the following:
find
method could then be mapped to a URL such as /company/find/5/
, where 5
represents the idCompany
value. This is achieved through the use of the @PathVariable
annotations and mappings in the form of /company/find/{idCompany}
.@SessionAttrribute
annotation to store data in the HTTP session between requests.@CookieValue
annotation to allow a method parameter to be bound to the value of an HTTP cookie.@RequestHeader
annotation to allow a method parameter to be bound to a request header.The testing of the handler classes using the Spring MVC Test framework should also be considered for enterprise Spring MVC applications. For more information, see the comprehensive guide at http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/testing.html#spring-mvc-test-framework. The framework provides JUnit support for testing the client- and server-side Spring MVC applications.
There is much more to the Spring MVC framework than can ever be covered in a single chapter. We recommend users find out more about Spring MVC capabilities from the excellent online resource at http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/mvc.html.
18.119.138.202