728x90
반응형
-ResponseEntity : ResponseEntity는 HttpEntity를 상속받고, HttpHearder와 body를 가질 수 있다.
Ex) public ResponseEntity<HashMap<String, Object>> getTest(final @PathVariable(name ="testNo") int testNo) throws Exception {
return ResponseEntity.ok().body(this.TestService.getTest(testNo));
-@PathVariable : PathVariable은 url에서 구분자에 들어오는 값 처리할 때 사용한다
testNo를 사용하여 구분함
-@RequestParam : 아래 예시와 같은 경우 no라는 파라미터를 받아오게 된다. 전달인자의 이름을 RequestParam괄호안에 표시하게 된다. read라는 url 뒤에 붙는 파라미터의 값을 가져옴
@GetMapping("read")
public ModelAndView getFactoryRead(@RequestParam("no") int factroyId, SearchCriteria criteria)
{
//...
}
반응형
'개미는뚠뚠 > 개발자' 카테고리의 다른 글
svn Synchronize target 폴더 제거 (0) | 2021.10.20 |
---|---|
Vue.js - watch(), beforeCreate(), created(), beforeMount(), mounted(), beforeDestroy() (0) | 2021.04.22 |
CSS, SCSS 차이란? (0) | 2021.03.12 |
오라클 <-> MSSQL 프로시져 컨버징 (0) | 2021.02.23 |
ORA-00923: FROM 키워드가 필요한 위치에 없습니다. (0) | 2021.02.16 |