@Controller
@RequestMapping("/board")
public class BoardController {
@GetMapping("/main")
public String main() {
return "board/main";
}
@GetMapping("/read")
public String read() {
return "board/read";
}
@GetMapping("/write")
public String write() {
return "board/write";
}
@GetMapping("modify")
public String modify() {
return "board/modify";
}
@GetMapping("/delete")
public String delete() {
return "board/delete";
}
}
board폴더안에 read, write, modify 파일 만들기
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var='root' value="${pageContext.request.contextPath }/"/>
<!-- 상단 메뉴 부분 -->
<c:import url="/WEB-INF/views/include/menu.jsp"/>
<!-- 생략... -->
<!-- 하단 푸터부분 -->
<c:import url="/WEB-INF/views/include/footer.jsp" />