목록Spring/연습 (14)
충분히 쌓여가는
@RestController @GetMapping hello() 클래스 추가 package com.buildenough.ch1; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController @SpringBootApplication public class Ch1Application { public static v..
Spring Initializr 링크 Project: Maven Spring Boot: 2.7.16 Language: Java Java: 11 Packaging: Jar Dependencies: Spring Boot DevTools, Spring Web, Thymeleaf, Lombok GENERATE 선택
MemberController.java package com.buildenough.practice1.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @Controller public class MemberController { @GetMapping("/member/save") public String saveForm() { return "save"; } @PostMapping("/member/save") public String sa..
index.html 수정 Hello Spring Boot 회원가입 로그인 MemberController 생성 MemberController.java package com.buildenough.practice1.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; @Controller public class MemberController { // 회원가입 페이지 출력 요청 @GetMapping("/member/save") public String saveForm() { return "save"; // templates의 save.html이라는 폴..