-
2021.08.13 기록장TIL 2021. 8. 12. 22:50
ToDo
- 알고리즘 문제
- 토비의 스프링
Done
- 스프링 시큐리티,
Weekly goal
- 책 읽기
- 토비 스프링 코딩
- 7월 회고 쓰기
페이징 하기
사이즈는 5, 디폴트 페이지는 0이다.
thymeleaf에서는 페이징을 쉽게 할 수 있다. 첫 페이지와 끝을 설정하고 중간에 sequence를 돌리면 된다.
url을 만들면서한 생각
항상 rest거리면서 users/{id}같은 형태로 써왔는데
users?id=1같은 형태는 안되는가이다.
이 아티클에서는 식별을 위해서는 패스 파라미터를 쓰고, 필터링을 위해서는 쿼리스트리을 쓰라고 한다.
https://medium.com/@fullsour/when-should-you-use-path-variable-and-query-parameter-a346790e8a6d
When Should You Use Path Variable and Query Parameter?
In this article, I’d like to show you what is a Path Variable and Query Parameter. And how you think and use those as best practice.
medium.com
https://stackoverflow.com/questions/3821663/querystring-in-rest-resource-url
Querystring in REST Resource url
I had a discussion with a colleague today around using query strings in REST URLs. Take these 2 examples: 1. http://localhost/findbyproductcode/4xxheua 2. http://localhost/findbyproductcode?produc...
stackoverflow.com
search에 대해서도 나오는데 rest한 마땅한 방법이 없지만 문서화를 잘하라고 한다.
https://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api
Best Practices for Designing a Pragmatic RESTful API
Your data model has started to stabilize and you're in a position to create a public API for your web app. You realize it's hard to make significant changes to your API once it's released and want to get as much right as possible up front. Now, the interne
www.vinaysahni.com
'TIL' 카테고리의 다른 글
2021.08.15 기록장 (0) 2021.08.14 2021.08.14 기록장 (0) 2021.08.14 2021.08.12 기록장 (0) 2021.08.11 2021.08.09~11 기록장 (0) 2021.08.08 2021.08.08 기록장 (0) 2021.08.07