我从像/test/new.ui
这样的ajax调用spring控制器。如何在控制器方法中执行RequestMapping。
先谢谢。
此致 拉朱
答案 0 :(得分:1)
@Controller
@RequestMapping("/test/") //This is optional to separate the /test/ part from the new.ui if you want to do other urls under the /test/
public class SomeController {
@RequestMapping("new.ui") //You can also do the entire url fragment here "/test/new.ui"
public Object handleNewMethod(/* ModelAttributes, Errors, RequestParams here */) {
// Code here
}
}