-
Less than 1 minute read
์ญ์ ๋ฒํผ ๋ง๋ค๊ธฐ read.jsp ํ์ผ์ ์ญ์ ํ๊ธฐ ๋ฒํผ์ ๋ง๋ค์ด์ฃผ์ <a href="/board/delete?num=${data.num}" role="button" class="btn btn-outline-info">์ญ์ ํ๊ธฐ</a> Mapper <!-- ๊ฒ์๊ธ ์ญ์ --> <delete id="delete"> delete from springtest where num = #{num} </delete> DAO DAO public void delete(int num); DAOImpl // delete @Override public void delete(int num) { sqlSession.delete(namespace + ".delete", num); } Service Service...
Continue reading...
-
1 minute read
JSPํ์ผ ๋ง๋ค๊ธฐ /board/update.jsp <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <style> .center{ margin: 5px 25px; padding: 20px } </style> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <meta charset="UTF-8"> <title>update</title> </head> <body> <h2>Update Page</h2> <form name="update" method="post" action="${path}/board/update?num=${data.num}" class="center"> <div class="form-group"> <label>์ด๋ฆ</label>...
Continue reading...
-
2 minute read
JSPํ์ผ ๋ง๋ค๊ธฐ /board/read.jsp <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <meta charset="UTF-8"> <title>read</title> </head> <body> <h2>Read Page</h2> <table class="table table-striped table-bordered border-primary"> <tbody> <tr> <th>๊ธ๋ฒํธ</th> <td>${data.num}</td> </tr> <tr> <th>์์ฑ์ผ</th> <td> <fmt:formatDate value="${data.date}" pattern="yyyy-MM-dd" />...
Continue reading...
-
2 minute read
JSP ํ์ผ ๋ง๋ค๊ธฐ src/main/webapp/WEB-INF/views ํ์์ /board/create.jsp ์์ฑ <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <style> .center{ margin: 5px 25px; padding: 20px } </style> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <meta charset="UTF-8"> <title>create</title> </head> <body> <h2>Create Page</h2> <form class="center" method="post"> <div...
Continue reading...
-
4 minute read
๐ ์์ํ๊ธฐ ์ ์ ์๊ณ ๊ฐ์! ๐ DAO์ Service : ๊ตฌํ ์ ํฐ ์ฐจ์ด๋ ์์ง๋ง DAO์๋ ์ถํ ์ฐ๋ํ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์ธ์
๋ฐ Mybatis ์ฝ๋๊ฐ ์ ์ฉ๋จ Controller : ์ฌ์ฉ์์ Request๋ฅผ ์ ๋ฌ ๋ฐ์ ์์ฒญ์ ์ฒ๋ฆฌ๋ฅผ ๋ด๋นํ๋ Service๋ฅผ ํธ์ถํจ Service Controller์ ์ํด ํธ์ถ๋์ด ์ค์ ๋น์ฆ๋์ค ๋ก์ง๊ณผ ํธ๋์ญ์
์ ์ฒ๋ฆฌํจ DAO๋ฅผ ํธ์ถํ์ฌ DB CRUD ์ฒ๋ฆฌ ํ Controller๋ก ๋ฐํ๋จ...
Continue reading...