Spring-Spring MVC2 Comments

PropertiesMethodNameResolver, a flexible MultiActionController method name resolver, to define the mapping between the URL and method name explicitly. See following example :

  • MultiActionController

A MultiActionController example.

  • PropertiesMethodNameResolver

With PropertiesMethodNameResolver, you can map whatever URL name to corresponds method name easily :

Now, the URL will map to the method name in the following pattern :

  1. /customer/a.htm –> add() method
  2. /customer/b.htm –> update() method
  3. /customer/c.htm –> delete() method
  4. /customer/d.htm –> list() method
  5. /customer/whatever.htm –> add() method
By default, MultiActionController is used the InternalPathMethodNameResolver to map URL to the corresponds method name.

2 Comments on this article

Add a comment