IT/Spring
spring MVC(모델2)방식,JAVA, MySQL , RESFUL, 게시판 만들기 , 006.01 , jsp 파일 설정
sucun
2020. 8. 24. 09:07
src/main/webapp (폴더 없으면 프로젝트에 우클릭하여 폴더 생성)
WEB-INF/views/
boardList.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta http-equiv="Content-Type" content= "text/html; charset=UTF-8">
<!-- BootStrap CDN -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
<title>게시글 목록</title>
</head>
<body>
<h3>게시글 목록</h3>
<button class="btn btn-primary" style="float : right;" onclick="location.href='/board/post'">작성</button>
<table class="table">
<tr>
<th>No</th>
<th>제목</th>
<th>작성자</th>
<th>작성날짜</th>
<th>조회수</th>
</tr>
<c:forEach var="board" items="${list}">
<tr>
<td>${board.bno}</td>
<td><a href="/board/${board.bno}">${board.subject}</a></td>
<td>${board.writer}</td>
<td><fmt:formatDate value="${board.reg_date}" pattern="MM/ dd" /></td>
<td>${board.hit}</td>
</tr>
</c:forEach>
</table>
</body>
</html>
https://private.tistory.com/38?category=655784
스프링 부트 게시판 만들기4 - Rest방식의 게시글 목록/작성/수정/삭제
관련글 : 스프링 부트로 게시판 만들기1 - 프로젝트 생성 스프링 부트로 게시판 만들기2 - MyBatis, MySQL 연동 스프링 부트로 게시판 만들기3 - JSP 사용하기 사실 포스팅은 매일하는데 어제는 작성 완
private.tistory.com
반응형