java - Spring Converter for Cookie[] on controller method -


i have case have multiple cookie values need used populate single java object. have controller signature this:

@requestmapping("/test") public string displayuserdata(person person) {   ... } 

i have created converter cookie[] person , registered using addformatters method on webmvcconfigureradapter class, can't seem spring use it.

i have converter works fine , set in same way. difference between 2 working 1 uses @pathparameter variable instead of cookie[].

i know access cookie[] , run conversion manually, less elegant using converter. ideas of how make work?

btw set spring 3.1 using annotation configuration (no xml anywhere).

see http://static.springsource.org/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-ann-cookievalue


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -