TIL

spring ) pathVariable URL ํŠน์ˆ˜๋ฌธ์ž ๋ฐ›๊ธฐ

jjingle 2022. 1. 26. 00:54

#์ฐธ๊ณ 

https://soheemon.tistory.com/entry/Spring-RestController%EC%97%90%EC%84%9C-PathVariable%EB%A1%9C-email%EC%9D%84-%EB%84%98%EA%B8%B8%EB%95%8C-%EC%9D%B4%EC%8A%88

 

Spring, RestController์—์„œ @PathVariable๋กœ email์„ ๋„˜๊ธธ๋•Œ ์ด์Šˆ.

Controllerํ…Œ์ŠคํŠธ๋ฅผ ํ–ˆ์„๋•Œ email์˜ ํŠน์ • url์— ๋Œ€ํ•ด 406 ์—๋Ÿฌ ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ๋‹ค. (soheemon@test.co.kr์€ 200OK ๋ฐ˜๋ฉด soheemon@test.com์€ 406 error ๋ฐœ์ƒ.) "/isAlreadMember/{email:.+}" ์Šคํ”„๋ง์ด .์„ ๊ธฐ..

soheemon.tistory.com

https://blog.naver.com/PostView.naver?blogId=geewonjung&logNo=221347758535&redirect=Dlog&widgetTypeCall=true&directAccess=false 

 

GET ์š”์ฒญ ์‹œ ํŒŒ๋ผ๋ฏธํ„ฐ์— ํŠน์ˆ˜ ๋ฌธ์ž ์‚ฌ๋ผ์ง€๋Š” ๋ฌธ์ œ (?, &, + ..)

GET ๋ฐฉ์‹์œผ๋กœ parameter๋ฅผ ๋„˜๊ธธ ๋•Œ ํŠน์ˆ˜๋ฌธ์ž๊ฐ€ ์—†์–ด์ง€๋Š” ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค. '&'์™€ '+'๋Š” GET ๋ฐฉ์‹...

blog.naver.com

 

https://moonsiri.tistory.com/58

 

JSP์—์„œ URL encode ํ•˜๋Š” ๋ฐฉ๋ฒ• (ํŠน์ˆ˜๋ฌธ์ž UTF-8 ์ธ์ฝ”๋”ฉ)

param์˜ ๊ฐ’์„ UTF-8์ธ์ฝ”๋”ฉํ•˜์—ฌ ๊ฐ’์„ ๋„˜๊ฒจ๋‹ฌ๋ผ๋Š” ์š”์ฒญ์„ ๋ฐ›๊ณ ์„œ encodeURI() ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ฒ˜๋ฆฌ๋ฅผ ํ–ˆ๋Š”๋ฐ +์™€ ๊ฐ™์€ ํŠน์ˆ˜๋ฌธ์ž๋Š” ๋ณ€๊ฒฝ์ด ๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. let url = "https://moonsiri.tistory.com?id="; let id..

moonsiri.tistory.com