in Springmvc, it is not possible to bind multiple identical URLs to the same method by default. If you need to bind, you need to increase the Param parameter, and the values are different.
I do not have this requirement, or there is a need, I also think of the use of different URLs.
There are a few such needs in the project, so write a demo.
@RequestMapping (value= "/test", params= "Method=method1")
Public void Method1 () {
System.out.println ("method1");
}
@RequestMapping (value= "/test", params= "Method=method2")
Public void Method2 () {
System.out.println ("Method2");
}
@RequestMapping (value= "/test")
Public void Method3 () {
System.out.println ("method3");
}
There are similar articles on the Internet, which can be said to have a lot of interest to understand and practice.
http://huangyunbin.iteye.com/blog/1893471
There is a truth in this: if you first understand a thing, need to use, it is easy to associate. For example, a software, an open source library, an uncommon usage.
Otherwise, it's hard for you to know that there is such a new thing.
If you already have the information to meet your needs, and you adapt to it, you may have a lazy mind, do not want to learn new knowledge.
SpringMVC3, using the requestmappint param parameter, implements a URL binding of multiple methods