spring mvc - Signature of Methods Returning ModelAndView and Request Mapping by Method Name -
two beginner springmvc questions:
1) there required signature types in springmvc modelandview-returning methods, or it's free-form, whatever params/order want? i've seen these examples:
public modelandview action1(httpservletrequest request); public modelandview action2(model m); public modelandview action2(httpservletrequest request, model m); public modelandview action4(); //etc.
2) possible have requestmapping method name, not whole url? have url, /test, can either /test?method=action1 or /test?method=action2 (similar struts).
@requestmapping("/test?method=action1") public modelandview action1(model m) { //... }
Comments
Post a Comment