Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 네트워크관리사
- html
- sql
- jsp
- 자바
- autoset
- VLAN
- javaee
- Java
- NCS
- 버추얼머신
- cisco packet
- 이것이 자바다
- 라우터
- 정처기필기
- Oracle
- php
- 참조타입
- 리눅스
- Cisco
- 데이터베이스
- jsp연결
- rinux
- 원형그래프
- ciscopacket
- 네트워크
- 오라클
- w3school
- ospf
- 정보처리기사
Archives
- Today
- Total
기록해! 정리해!
JPA - Board(Junit -2) 본문
- BoardController 생성
- BoardController
package com.rubypaper.board;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class BoardController {
@Autowired
private BoardServiceImpl service;
@RequestMapping("/getBoardList.do")
public void getBoardList(Board vo, Model model){
model.addAttribute("li", service.getBoardList(vo));
}
}
- index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<div align="center">
<h2> thymeleaf </h2>
<a href=getBoardList.do>getBoardList 목록보기</a>
</body>
</html>
- getBoardList.html
<html xmlns:th="http://www.thymeleaaf.org">
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<div align="center">
<table border=1>
<tr>
<td>IDX</td>
<td>SEQ</td>
<td>TITLE</td>
<td>WRITER</td>
<td>PASSWORD</td>
</tr>
<tr align="center" th:each="m , state : ${li}">
<td th:text="${state.count}" />
<td th:text="${m.seq}" />
<td th:text="${m.title}" />
<td th:text="${m.writer}" />
<td th:text="${m.password}" />
</tr>
</table>
</div>
</body>
</html>
>>
'SpringBoot' 카테고리의 다른 글
JPAJarTymeleaf-1 Test(Crudrepository 메소드사용) (0) | 2022.10.18 |
---|---|
JPAJarTymeleaf-1 (board) (0) | 2022.10.18 |
JPA - Board(Junit-1) (0) | 2022.10.17 |
JPAJarTymeleaf - Board (0) | 2022.10.17 |
JPA 스타트 (테이블 생성 후 오라클에서 확인하기) (0) | 2022.10.17 |
Comments