๐ Spring/Spring MVC, DB ์ ๊ทผ ๊ธฐ์
์คํ๋ง ์น MVC : API @ResponseBody
@ResponseBody ๋ฌธ์ ๋ฐํ @controller public class HelloController{ @GetMapping("hello-string") @ResponseBody public String helloString(@RequestParam("name") String name){ return "hello " + name; } } @ResponseBody๋ฅผ ์ฌ์ฉํ๋ฉด ๋ทฐ ๋ฆฌ์กธ๋ฒ (ViewResolver)๋ฅผ ์ฌ์ฉํ์ง ์์ ๋์ ์ HTTP์ BODY์ ๋ฌธ์ ๋ด์ฉ์ ์ง์ ๋ฐํ(HTML BODY TAG๋ฅผ ๋งํ๋ ๊ฒ์ด ์๋) @ResponseBody @Controller public class HelloController{ @GetMapping("hello-api") @ResponseBody publ..