
<%@ 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="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="cpath" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Spring MVC10</h2>
<div class="panel panel-default">
<div class="panel-heading">BOARD</div>
<div class="panel-body">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>번호</th>
<th>제목</th>
<th>작성자</th>
<th>작성일</th>
<th>조회수</th>
</tr>
</thead>
<c:forEach var="vo" items="${list}">
<tr>
<th>${vo.idx}</th>
<th>${vo.title}</th>
<th>${vo.content}</th>
<th>${vo.indate}</th>
<th>${vo.count }</th>
</tr>
</c:forEach>
</table>
</div>
<div class="panel-footer">스프2탄(답변형 게시판 만들기)</div>
</div>
</div>
</body>
</html>

연월일만 출력되게
<th><fmt:formatDate pattern="yyyy-MM-dd" value="${vo.indate}"/></th>
바꾸고

string 이였던거 데이트로 바꿈

'spring framework 인프런강의 > spring boot' 카테고리의 다른 글
| 스프2탄_테이블에 글 저장하기(SELECT->INSERT) (0) | 2024.12.27 |
|---|---|
| 10_스프2탄_글쓰기 폼 만들기 (0) | 2024.12.26 |
| _스프2탄_JUnit리스트보기 Controller 테스트 (1) | 2024.12.26 |
| 스프2탄_JUnit리스트보기 Service 테스트 (0) | 2024.12.25 |
| SpringMVC10 스프2탄_JUnit리스트보기 Mapper 테스트 (0) | 2024.12.23 |