I recently attended Keith Donald's presentation on "Developing Rich Web Applications with Spring." Keith demonstrated some annotation based configuration capabilities with Spring MVC that I am having a hard time duplicating. His example was
AT-Controller
public class HotelsController {
AT-RequestMapping
public void index(...) {...}
AT-RequestMapping
public void show(...) {...}
AT-RequestMapping
public void update(...) {...}
}
where /hotels/index would automatically map to HotelsController.index(), etc.
I can make this occur using the AT-RequestMapping("/hotels/index") explicit declaration but not the implicit /controller/method form.
I am using Spring 2.5.6 and have the DefaultAnnotationHandlerMapping, AnnotationMethodHandlerAdapter, and component-scan declarations in my servlet.xml.
Am I misunderstanding something? Do I have some configuration missing? Is this possible with Spring 2.5?
Thanks for any help,
Joe Skora
(Please replace "AT-" above with "at" symbol which is producing an error when I am trying to post this.)


Reply With Quote
