1. 프론트 데스크 양식이 직접 게시되거나 얻어지며, 배경은 request.getParameterMap () 또는 request.getParameter ()의 형식으로 수신됩니다.
참고 : 전경, SpringMVC 필터 및 JSP, 컴파일러 인코딩은 모두 UTF-8을 예로 들어
예제로 request.getParameterMap ()을 취하십시오
참고 : 다음은 httpservletrequest에서 매개 변수를 얻는 메소드이며 요청에 따라 유사합니다.
@requestmapping ( "/tradeportal/cheformands") public modelandview 리시브 커밋 (httpservletrequest request, httpservletresponse 응답) {}이 방법에서 가져옵니다
public static map <string, string> getParamters (httpservletrequest request) {logger.info ( "시작 요청 매개 변수"); map <?,?> paramtermap = request.getParamEterMap (); map <string, string> paramap = new ConcurrenthashMap <String, String> (); for (map.Entry entry : paramertermap.entryset ()) {if (array.getLength (enther.getValue ()) <1 || stringUtil.isempty ((string) (array.get (enther.getValue (), 0)))) {paramap.put ((string) enther.getKey (), null); } else {if (request.getMethod (). equalSignoreCase ( "get")) {try {paramap.put ((string) entry.getKey (), new String ((string) (array.get (enther.getValue (), 0)). } catch (UnsupportedEncodingException e) {e.printstacktrace (); }} else {paramap.put ((string) entry.getKey (), (string) (array.get (entry.getValue (), 0)); }}} logger.info ( "매개 변수가 완료되었습니다. 매개 변수는"+ json.tojsonstring (paramap)); 반환 파라 맵; }위의 기사는 양식 게시물에서 차량 코드 문제를 해결하고 SpringMVC 백엔드를 얻는 것은 내가 공유하는 모든 컨텐츠입니다. 나는 그것이 당신에게 참조를 줄 수 있기를 바랍니다. 그리고 당신이 wulin.com을 더 지원할 수 있기를 바랍니다.