티스토리 뷰
관련글 : exhibitlove.tistory.com/112
@RequestMapping(value = "/qlty/consumerInfo/putSftridn", method = RequestMethod.PUT)
public @ResponseBody ModelAndView putSftridn(@RequestBody Map<String,Object> params) throws Exception {
ModelAndView mv = new ModelAndView("jsonView");
try {
int count = coltWaterInfosService.putSftridn(params);
mv.addObject("count", count);
} catch (Exception e) {
e.printStackTrace();
}
return mv;
}
const putSftridnOfConsumer = function(dataRow) {
var param = JSON.stringify(dataRow);
$.ajax({
url : '/qlty/consumerInfo/putSftridn' ,
type : "PUT",
datatype : "JSON",
data : param,
contentType: 'application/json;charset=UTF-8',
success : function(result) {
if (result.count > 0)
console.log(`${dataRow.DMNO} 수정됨`);
}
,error : function(request, error) {
console.log("message: " + request.responseText + ", error:" + error);
}
});
};
위의 api호출하는데 var param = JSON.stringify(dataRow); 요 코딩이 없으면 400에러 발생
'Skill > spring' 카테고리의 다른 글
[mybatis] DAO 작성 3가지 방법 (0) | 2020.10.29 |
---|---|
[mybatis] NumberformatException이 나는 경우 (0) | 2020.10.21 |
[mybatis] Procedure 호출 방법(out 결과 받기) (0) | 2020.10.13 |
톰캣 세션 타임 아웃 설정 (0) | 2020.09.23 |
apache tiles 사용법 (0) | 2020.09.19 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 정규식
- 전후방탐색
- $.each
- element위치
- border-collapse
- CSS
- QueryDSL
- lombok
- draw.io
- devtools
- Keycode
- @ExceptionHandler
- Javascript
- excel
- 프로젝트명변경
- sumifs
- ul li로 테이블
- DatePicker
- spring
- oracle
- getter
- PostgreSQL
- 진열사랑
- springboot
- caniuse
- JQuery
- object key
- $.extend
- setter
- 여러 컬럼 update
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함