Request parameter 관련 정리 내용입니다. 1. @RequestParam 처리 2. 객체 매핑 3. @RequestBody 처리 4. Boolean, Date, DateTime, enum 등 처리 1. @RequestParam 처리 @RequestParam은 파라미터에서 하나의 값을 추출할 때 이용이 됩니다. String id = (String)request.getParameter("id"); 이렇게 값을 받을 수 있는데 이런 부분을 쉽게 처리할 수 있도록 해주는 어노테이션입니다. @Target(ElementType.PARAMETER) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface RequestParam { @AliasF..
URI의 path를 다양한 형태로 매핑하는 예제를 만들어 봅니다. java @Slf4j @RestController @RequestMapping("/controller/path") public class PathVariableAPIController { /** * 단순 매핑 테스트 * @return */ @GetMapping("/{id}") public ResponseEntity simple(@PathVariable String id) { log(id); return ResponseEntity.ok(id); } /** * required false test * @param id * @return */ @GetMapping(value = { "/requiredfalse", "/requiredfalse/{i..
요청 시 컨트롤러의 메소드에 어떻게 매핑되는지 기본적인 annotation에 대해 이해한다. Request Mapping Annotation 종류 Annotation Target Method Remark @RequestMapping @Target({ElementType.TYPE, ElementType.METHOD}) All 전체 @GetMapping @Target(ElementType.METHOD) RequestMethod.GET 조회 @PostMapping @Target(ElementType.METHOD) RequestMethod.POST 등록, 생성, 저장 @PutMapping @Target(ElementType.METHOD) RequestMethod.PUT 수정 @DeleteMapping @Targ..
- Total
- Today
- Yesterday
- 샘플
- thymeleaf
- 그리드
- UI
- RESTful
- 스프링부트
- REST
- 예제
- SHEETJS
- 메시지
- listToMap
- mybatis
- mapToList
- example
- sample
- springboot
- java
- lombok
- 스프링
- 설정
- 엑셀
- AG-GRID
- cache
- 타임리프
- ag grid
- spring
- restful서비스
- oracle
- Javascript
- Spring Boot
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |