티스토리 뷰

[Spring] 컨트롤러에서 웹 페이지 바로 출력


1. code

@Controller
public class PageController {
	
	@RequestMapping(value = "/print.do", produces = "text/html; charset=utf-8")
	@ResponseBody
	public String print (HttpServletRequest req) throws Exception {
		String result = "test";
		return result;
	}

}

// 출력결과 : test



도움이 되셨다면 공감이나 좋아요 부탁드립니다~♡

광고를 클릭해주시면 더욱 감사하구요~♡v♡/

혹시 더 궁금하신 점이나 부족한 부분, 잘못된 내용이 있다면 댓글 부탁드립니다~~


공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함