Backend/Spring Framework

[Spring Framework]스프링 컨트롤러에서 외부로 URL 리다이렉트

nect2r 2020. 12. 1. 00:15

서버 안에 페이지 말고 외부 URL로 이동시킬 때

public String Login(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException {
		final String redirectUrl = "redirect:http://www.naver.com";
		return redirectUrl;
	}


redirect로 http부터 시작하면 됩니다.