Spring 5

[Spring] 301, 302 redirect 시키기

웹 크롤링을 하다가 보면 해당 url을 접근하지 못하거나 에러가 생겨 리다이렉트를 해야하는 경우가 발생 * 301과 302의 차이 https://nsinc.tistory.com/168 [HTTP] 301과 302 Redirect의 차이 HTTP Response Status Code는 요청에 대한 웹서버의 응답을 나타내는 코드를 말합니다. 이 코드를 바탕으로 웹브라우저나 검색엔진 크롤러는 요청을 어떻게 처리해야할지 판단하게 됩니다. 유명한 코 nsinc.tistory.com 우리 프로젝트는 크롤링에 필요하기 때문에 302 리다이렉트 필요 /** * 리다이렉트 */ @GetMapping(value="/redirect") public RedirectView redirect(String url) { log.in..

study/TIL🐥 2022.10.31

[JAVA/Spring] [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unexpected character ('}' (code 125))

Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unexpected character ('}' (code 125)): was expecting double-quote to start field name; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character ('}' (code 125)): was expecting double-quote to start field name at [Source: (org.springframework.util.StreamUtils$NonClosingIn..

study/TIL🐥 2022.08.05