MultiActionController 配置的三种方式
ParameterMethodNameResolver InternalPathMethodNameResolver PropertiesMethodNameResolver 定义一个Controller继承与MultiActionController
方法的定义必须符合下面的格式
Java代码
测试
下面是对应于不同MethodNameResolver的测试url.
http://localhost:9080/cn.iwoo/spring/b?method=doSearch
http://localhost:9080/cn.iwoo/spring/b/doSearch
http://localhost:9080/cn.iwoo/spring/b/page.html
注:/b/是我的controller的映射前缀,在PropertiesMethodNameResolver的mappings配置里面,网址必须是/b/开头,也就是controller的前缀也需要写进去. 这是我测试的结果,不知是否必须这样.