-
2021.07.24~25 기록장TIL 2021. 7. 23. 23:43
ToDo
- 코테 및 테스트 프로젝트 작성
Done
- 테스트 프로젝트 작성
Weekly goal
- 책 읽기
- 토비 스프링 코딩
service가 하는 기능은 restTamplate를 통해 게시물의 정보를 가져오는 일이다.
여기서 고민한 것이 이것은 유틸성 클래스로도 충분하지 않을까?라는 생각이었다.
여러 글들을 읽고 내린 결론은 서비스는 DI로 인해 변경이 자유롭다는 것이다. 그래서 나중에 content를 얻어올 때 방법이 달라지면 쉽게 변경이 가능하다.
https://stackoverflow.com/questions/871434/java-utility-class-vs-service
Java Utility Class vs. Service
What's the difference in Java between a utility class (a class with static methods) and a Service class (a class with public methods that provides a "service"). For example, one can argue that a
stackoverflow.com
또 url을 Uri빌더를 통해 만들고 toString()을 하니 특수문자들이 인코딩 되어 주소가 변경되는 이슈가 있었다.
해결법은 uri타입으로 넘겨주면 된다.
https://lng1982.tistory.com/341
RestTemplate 사용시 URL 인코딩 이슈
RestTemplate 사용 시 파라미터 값이 자동으로 인코딩 되는 현상을 발견하게 되었다. 전송되는 URL은 다음과 같은데 파라미터 값에 특수문자들이 들어간다. http://api.com?param=ABCDE+=,$%ABCDE 이와 같이 상
lng1982.tistory.com
https://stackoverflow.com/questions/16084935/a-html-space-is-showing-as-2520-instead-of-20
A html space is showing as %2520 instead of %20
Passing a filename to the firefox browser causes it to replace spaces with %2520 instead of %20. I have the following HTML in a file called myhtml.html:
stackoverflow.com
'TIL' 카테고리의 다른 글
2021.07.28 기록장 (0) 2021.07.27 2021.07.26~27 기록장 (0) 2021.07.25 2021.07.23 기록장 (0) 2021.07.22 2021.07.22 기록장 (0) 2021.07.21 2021.07.21 기록장 (0) 2021.07.20