일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 그리디
- Android
- java
- spring
- SpringBoot
- jpa
- http
- 알고리즘
- 스프링
- Thymeleaf
- QueryDSL
- Greedy
- 스프링 핵심 기능
- Proxy
- springdatajpa
- Exception
- Servlet
- JPQL
- db
- pointcut
- Spring Boot
- AOP
- 김영한
- 스프링 핵심 원리
- kotlin
- 인프런
- transaction
- 백준
- JDBC
- 자바
- Today
- Total
목록TypeConverter (2)
개발자되기 프로젝트
타입 컨버터를 사용하려면 org.springframework.core.convert.converter.Converter 를 구현 ㅋㅋㅋㅋ Converter라는 인터페이스가 너무 많음.. 조심 ㅎㅎ 1. String -> Integer import lombok.extern.slf4j.Slf4j; import org.springframework.core.convert.converter.Converter; @Slf4j public class StringToIntegerConverter implements Converter { @Override public Integer convert(String source) { log.info("convert source= {}", source); return Integer..
1. ex) 문자 -> 숫자 @RestController public class HelloController { @GetMapping("/hello-v1") public String helloV1(HttpServletRequest request){ String data = request.getParameter("data"); //문자 타입 조회 Integer integer = Integer.valueOf(data); //숫자 타입으로 변경 System.out.println("integer = " + integer); return "ok"; } } 분석 localhost:8080/hello-v1?data=10 String data = request.getParameter("data") HTTP 요청 파라미..