๐2022-08-16๐
connect ํ๋ฉด ๋ฑ connect.
disconnect ๋ฌผ๊ณ ์์ผ๋ฉด ์๋จ,, ๋์์ ์ ์ฉํ ์ ์๋ connection์ด ์ ํํ๊ธฐ ๋๋ฌธ์
๊ณจ๊ณ ๋ฃจ ๋๋ ์ฐ๋ ค๋ฉด ๋์ด์ ์ฌ์ฉ..
๋์์ 10๋ช ์ ์ฌ์ฉํ ์ ์๋ ํด๋ผ์ด์ธํธ ๋์์ ์ ์ฉ
์ธ ๋๋ง ์ฐ๊ฒฐํ๊ณ ํ๊ธฐํ๋..
์ง์ง ํด๋ผ์ด์ธํธ๊ฐ ๋ค์์ผ ๋ 10๊ฐ์ connection์ ๋ฏธ๋ฆฌ ๋ง๋ค์ด ๋๊ณ mysql์ด๋ ๋ถ์ด์์
์ฌ์ฉํ ์ ์๋ ํด๋ผ์ด์ธํธ๊ฐ ๊ฐ์ ธ๋ค๊ฐ DB์ฐ๊ฒฐํด์ ์ฐ๊ณ ๋๊ณ ,, ๋ฐ๋ณต
connection pool ์ต๋ ํ์ฉ ์ปจ๋ฅ์ ์ ๋ฏธ๋ฆฌ ๋ง๋ค์ด ๋๋ค.
2~4๊ฐ๋ง ๋ง๋ค์ด ๋๋ค. ์ข ๋ ํ์ํ๋ฉด +2 +2 +2 .. max.. ์ด๋ฏธ ๋ง๋ค์ด๋๊ฑฐ๋ ์ง์ฐ์ง ์์
๋ค๋ฅธ ์๋น์ค๋ฅผ ๋ง๋ค์ด ๋์ง ์๋๋ค. ๋ํ์ ์ผ๋ก ์ปจ๋ฅ์ ํ์ ์ฌ์ฉํ๋ค.
์ ์ฒด๊ฐ model ๋น์ฆ๋์ค ๋ก์ง์ ๋ค์ด๊ฐ๋ ๊ฒ
๋ชจ๋ธ ๋ถ๋ถ์ ํ๋์ ํจํค์ง
controller์์ service service์์ dao๋ถ๋ฅด๊ธฐ
์ปจํธ๋กค๋ฌ์์ dao ์ง์ ๋ถ๋ฌ๋ ๋๋,,? ๊ตณ์ด ์๋น์ค๋ฅผ ๋ผ๋ ์ด์
/
1. ๋ฐ์ดํฐ๋ฒ ์ด์ค ์ฟผ๋ฆฌ๋ฅผ ๋ฐ๊พผ๋ค. X ํ์์ ์ผ๋ก ์ฐ๋ ๊ฑฐ๋ผ ๋ฌธ์ ๊ฐ ์๋ค.
๋ค๋ฅธ ๊ณณ์์ ์ฐ์ผ ์๊ฐ ์๊ธฐ ๋๋ฌธ์
2. ๊ฐ๊ณ ์ค๋ ๋ฉ์๋ X ์ง์ ์ ๊ทผํ๋๊น MVC๊ฐ ๊นจ์ ธ๋ฒ๋ฆฐ๋ค.
MVC์ ์ง๋ณด์... MVC ๋ง๊ฒ ์ฌ์ฉ
์ค๊ฐ์ ์๋น์ค๋ฅผ ๋ง๋ค์์ผ๋ฉด, ๋ฆฌํด์์ x0.9๋ฅผ ํด์ฃผ๋ฉด๋๋ค.
๋น์ฆ๋์ค๋ก์ง์ด ์ปจํธ๋กค๋ฌ๋ก ๋ชป๋์ด๊ฐ๊ฒ...
config
ControllerConfig.java
package com.gyuone.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import com.gyuone.controller.BoardController;
import com.gyuone.dao.BoardDao;
import com.gyuone.model.ArticleVO;
import com.gyuone.service.BoardService;
@Configuration
@ComponentScan(basePackages= {"com.gyuone.config, com.gyuone.service"})
public class ControllerConfig {
@Bean
public ArticleVO articleVO() {
return new ArticleVO();
}
@Bean
public BoardDao boardDao() {
return new BoardDao();
}
// @Bean
// public BoardService boardService() {
// return new BoardService();
// }
@Bean
public BoardController boardController() {
return new BoardController();
}
}
MvcConfig.java
package com.gyuone.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
@EnableWebMvc
public class MvcConfig implements WebMvcConfigurer{
@Override
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
// TODO Auto-generated method stub
configurer.enable();
}
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
// TODO Auto-generated method stub
registry.jsp("/WEB-INF/view/", ".jsp"); // .jsp๋ฅผ ์์์ ๋ถ์ฌ๋ผ.
}
}
controller
BoardController.java
package com.gyuone.controller;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import com.gyuone.model.ArticleVO;
import com.gyuone.service.BoardService;
@Controller
@RequestMapping("/board") // board๋ฅผ ๋ค ๋ฐ์
public class BoardController {
@Autowired
BoardService boardService;
@Autowired
ArticleVO articleVo;
List<ArticleVO> articleList = new ArrayList<ArticleVO>();
@RequestMapping({"/listArticles","/"}) // ๋ฐฐ์ด๋ก ๋๋ฆผ
public String getArticleList(Model model) {
articleList = boardService.listArticles();
model.addAttribute("articleList", articleList);
return "listArticles";
}
@RequestMapping("/newArticle")
public String writeArticle(Model model) {
return "articleForm";
}
@RequestMapping(value="/addArticle", method=RequestMethod.POST)
public String addArticle(Model model, @RequestParam(value="title") String title,
@RequestParam(value="content") String content) {
articleVo.setTitle(title);
articleVo.setContents(content);
articleVo.setWriteId("bit");
boardService.addArticle(articleVo);
return "redirect:listArticles"; // client ---> server addArticle๋ก ๋ค์ด์จ๊ฑฐ.
// server----> client ์์ฒญํ๊ฑฐ ๋ค ๋๋์ผ๋๊น listArticles๋ก ๋ ๋ถ๋ฌ์ค๋? ---> listArticles๋ก ๋ค์ ๋ถ๋ฌ์ค.
}
@RequestMapping(value="/viewArticle", method=RequestMethod.GET)
public ModelAndView viewArticle(@RequestParam(value="articleno") String articleNo) {
articleVo = boardService.viewArticle(Integer.parseInt(articleNo));
ModelAndView mv = new ModelAndView();
mv.setViewName("viewArticle");
mv.addObject("article", articleVo);
return mv;
}
}
dao
BoardDao.java
package com.gyuone.dao;
import java.io.Reader;
import java.util.List;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import com.gyuone.model.ArticleVO;
public class BoardDao {
private static SqlSessionFactory sessionFactory = null;
public static SqlSessionFactory getInstance() {
if(sessionFactory == null) {
try {
String resource = "mybatis-config.xml";
Reader reader = Resources.getResourceAsReader(resource);
sessionFactory = new SqlSessionFactoryBuilder().build(reader);
reader.close();
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
}
return sessionFactory;
}
public List<ArticleVO> selectAllArticles() {
sessionFactory = getInstance();
SqlSession session = sessionFactory.openSession();
List<ArticleVO> articleList = session.selectList("mapper.article.selectAllArticles"); // ๋ฆฌ์คํธ ํ์
์ผ๋ก ๋์ ธ์ค๋ค.
session.close();
return articleList;
}
public void insertNewArticle(ArticleVO article) {
sessionFactory = getInstance();
SqlSession session = sessionFactory.openSession();
session.insert("mapper.article.insertArticle", article);
session.commit();
// session.close(); commit์ ๋๋ฆฌ๋ฉด ์์์ ํด์ฃผ๊ธฐ ๋๋ฌธ์ close ์ํด๋ ๋๋ค.
}
public ArticleVO selectArticle(int articleNo) {
sessionFactory = getInstance();
SqlSession session = sessionFactory.openSession();
ArticleVO article;
article = session.selectOne("mapper.article.selectArticle", articleNo);
session.close();
return article;
}
public void updateArticle(ArticleVO article) {
sessionFactory = getInstance();
SqlSession session = sessionFactory.openSession();
session.update("mapper.article.updateArticle", article);
session.commit();
}
public void deleteArticle(int articleNo) {
sessionFactory = getInstance();
SqlSession session = sessionFactory.openSession();
session.delete("mapper.article.deleteArticle", articleNo);
session.commit();
}
}
model
ArticleVO.java
package com.gyuone.model;
public class ArticleVO {
private int articleNo;
private String title;
private String contents;
private String writeId;
private String writeDate;
public ArticleVO() { // value object
}
public ArticleVO(int articleNo, String title, String contents, String writeID) {
super();
this.articleNo = articleNo;
this.title = title;
this.contents = contents;
this.writeId = writeID; // date๋ default๋ผ ๋บ๋ค.
}
public int getArticleNo() {
return articleNo;
}
public void setArticleNo(int articleNo) {
this.articleNo = articleNo;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContents() {
return contents;
}
public void setContents(String contents) {
this.contents = contents;
}
public String getWriteId() {
return writeId;
}
public void setWriteId(String writeId) {
this.writeId = writeId;
}
public String getWriteDate() {
return writeDate;
}
public void setWriteDate(String writeDate) {
this.writeDate = writeDate;
}
}
service
BoardService.java
package com.gyuone.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gyuone.dao.BoardDao;
import com.gyuone.model.ArticleVO;
@Service
public class BoardService {
@Autowired
BoardDao boardDao;
public List<ArticleVO> listArticles(){
List<ArticleVO> articleList = boardDao.selectAllArticles();
return articleList;
}
public void addArticle(ArticleVO article) {
boardDao.insertNewArticle(article);
}
public ArticleVO viewArticle(int articleNo) {
ArticleVO article;
article = boardDao.selectArticle(articleNo);
return article;
}
}
src/resources
article-mapper.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="mapper.article">
<resultMap id="articleResult" type="articleVO">
<result property="articleNo" column="ArticleNO" />
<result property="title" column="Title" />
<result property="contents" column="Contents" />
<result property="writeDate" column="WriteDate" />
<result property="writeId" column="WriteID" />
</resultMap>
<select id="selectAllArticles" resultMap="articleResult">
<![CDATA[
select * from noticeboard order by WriteDate desc
]]>
</select>
<select id="selectArticle" resultType="articleVO"
parameterType="int">
<![CDATA[
select * from noticeboard where ArticleNo = #{articleNo}
]]>
</select>
<insert id="insertArticle" parameterType="articleVO">
<![CDATA[
insert into noticeboard (Title, Contents, writeDate, WriteID)
values (#{title}, #{contents}, default, #{writeId})
]]>
</insert>
<update id="updateArticle" parameterType="articleVO">
<![CDATA[
update noticeboard set Title= #{title}, Contents=#{contents}
where ArticleNo=#{articleNo}
]]>
</update>
<delete id="deleteArticle" parameterType="articleVO">
<![CDATA[
delete from noticeboard where ArticleNo=#{articleNo}
]]>
</delete>
</mapper>
mybatis-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<typeAliases>
<typeAlias type="com.gyuone.model.ArticleVO"
alias="articleVO" />
</typeAliases>
<environments default="dev">
<environment id="dev">
<transactionManager type="JDBC"></transactionManager>
<dataSource type="POOLED">
<property name="driver" value="com.mysql.cj.jdbc.Driver" />
<property name="url"
value="jdbc:mysql://localhost:3306/board?useUnicode=true&characterEncoding=utf8" />
<property name="username" value="gyuwon" />
<property name="password" value="1234" />
</dataSource>
</environment>
</environments>
<mappers>
<mapper resource="article-mapper.xml" />
</mappers>
</configuration>
src
โmain
โwebapp
โWEB-INF
โview
โarticleForm.jsp
<%@ 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="contextPath" value="${pageContext.request.contextPath}" />
<%
request.setCharacterEncoding("UTF-8"); // ์๋ฐ ์์ค ์ฝ๋์ฌ์ฉ
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>๊ธ์ฐ๊ธฐ</title>
<script>
function backToList(frm) {
frm.action="${contextPath}/board/listArticles";
frm.submit();
}
</script>
<style>
.class-caption {
width: 100px;
}
.class-content {
width: 500px;
}
@font-face {
font-family: 'LeeSeoyun';
src:
url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2202-2@1.0/LeeSeoyun.woff')
format('woff');
font-weight: normal;
font-style: normal;
}
* {
font-family: 'LeeSeoyun';
}
input:focus { background-color: #c0d9fc; }
textarea:focus { background-color: #c0d9fc; }
</style>
</head>
<body>
<h1 style="text-align: center; color:#c0d9fc;">์ ๊ธ ์ฐ๊ธฐ</h1>
<form name="articleForm" method="post" action="${contextPath}/board/addArticle">
<table boarder="0" align="center">
<tbody>
<tr>
<td align="right" class="class-caption">๊ธ์ ๋ชฉ:</td>
<td colspan="2">
<input type="text" maxlength="100" name="title" class="class-content" />
</td>
</tr>
<tr>
<td align="right" valign="top" class="class-caption"><br>๊ธ๋ด์ฉ:</td>
<td colspan="2">
<textarea name="content" rows="10" maxlength="2000" class="class-content" ></textarea>
</td>
</tr>
<tr>
<td align="right"></td>
<td colspan="2">
<input type="submit" value="๊ธ์ฐ๊ธฐ" />
<input type="button" value="๋ชฉ๋ก๋ณด๊ธฐ" onclick = "backToList(articleForm)" />
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
โlistArticles.jsp
<%@ 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="contextPath" value="${pageContext.request.contextPath}" />
<%
request.setCharacterEncoding("UTF-8"); // ์๋ฐ ์์ค ์ฝ๋์ฌ์ฉ
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>๊ธ ๋ชฉ๋ก</title>
<style>
@font-face {
font-family: 'LeeSeoyun';
src:
url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2202-2@1.0/LeeSeoyun.woff')
format('woff');
font-weight: normal;
font-style: normal;
}
* {
font-family: 'LeeSeoyun';
}
.cls1 {
text-decoration: none;
}
.cls2 {
text-align: center;
font-size: 30px;
display: block;
}
a:hover {
color: #153acf;
}
button:hover{
background-color: #c0d9fc;
}
/* width */
::-webkit-scrollbar {
width: 25px;
}
/* Track */
::-webkit-scrollbar-track {
box-shadow: inset 0 0 3px #c0d9fc;
border-radius: 5px;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #c0d9fc;;
border-radius: 5px;
}
</style>
</head>
<body>
<h1 style="text-align: center; color: #c0d9fc;">๊ธ ๋ชฉ๋ก</h1>
<br><br>
<table align="center" border="1" width="80%">
<thead>
<tr height="10" align="center" bgcolor="#c0d9fc">
<th>๊ธ ๋ฒํธ</th>
<th>์์ฑ์</th>
<th>์ ๋ชฉ</th>
<th>์์ฑ์ผ</th>
</tr>
</thead>
<c:choose>
<c:when test="${articleList == null}">
<tbody>
<tr height="10">
<td colspan="4">
<p align="center">
<b><span style="font-size: 9pt;">๋ฑ๋ก๋ ๊ธ์ด ์์ต๋๋ค.</span></b>
</p>
</td>
</tr>
</tbody>
</c:when>
<c:otherwise>
<!-- core ๋ผ์ด๋ธ๋ฌ๋ฆฌ -->
<tbody>
<c:forEach var="article" items="${articleList}"
varStatus="articleNum">
<tr align="center">
<td width="5%">${articleNum.count}</td>
<td width="10%">${article.writeId}</td>
<td align="left" width="35%"><span
style="padding-right: 30px"></span> <a class="cls1"
href="${contextPath}/board/viewArticle?articleno=${article.articleNo}">
${article.title} </a></td>
<td width="10%">${article.writeDate}</td>
</tr>
</c:forEach>
</tbody>
</c:otherwise>
</c:choose>
</table>
<br>
<a class="cls1" href="${contextPath}/board/newArticle">
<center>
<button>
<span class="clas2">๊ธ์ฐ๊ธฐ</span>
</button>
</center>
</a>
</body>
</html>
โviewArticle.jsp
<%@ 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="contextPath" value="${pageContext.request.contextPath}" />
<%
request.setCharacterEncoding("UTF-8"); // ์๋ฐ ์์ค ์ฝ๋์ฌ์ฉ
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>๊ธ๋ณด๊ธฐ</title>
<script>
function backToList(frm) {
frm.action="${contextPath}/board/listArticles";
frm.submit();
}
function fn_enable(){
document.querySelector("#i_title").disabled = false;
document.querySelector("#i_content").disabled = false;
document.querySelector("#tr_btn_modify").style.display = "table-row";
document.querySelector("#tr_btn").style.display = "none";
}
</script>
<style>
#tr_btn_modify {
display: none;
}
@font-face {
font-family: 'LeeSeoyun';
src:
url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2202-2@1.0/LeeSeoyun.woff')
format('woff');
font-weight: normal;
font-style: normal;
}
* {
font-family: 'LeeSeoyun';
}
/* width */
::-webkit-scrollbar {
width: 25px;
}
/* Track */
::-webkit-scrollbar-track {
box-shadow: inset 0 0 3px #c0d9fc;
border-radius: 5px;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #c0d9fc;
;
border-radius: 5px;
}
</style>
</head>
<body>
<h1 style="text-align: center; color: #c0d9fc;">์์ฑํ ๊ธ ํ์ธ</h1>
<br>
<form name="frmArticle" method="post" action="">
<table border="0" align="center">
<tbody>
<tr>
<td width="150" align="center" bgcolor="#c0d9fc">๊ธ๋ฒํธ</td>
<td><input name="articleNo" type="text"
value="${article.articleNo}" disabled /></td>
</tr>
<tr>
<td width="150" align="center" bgcolor="#c0d9fc">์์ฑ์ID</td>
<td><input name="writer" type="text"
value="${article.writeId}" disabled /></td>
</tr>
<tr>
<td width="150" align="center" bgcolor="#c0d9fc">์ ๋ชฉ</td>
<td><input name="title" type="text" value="${article.title}"
id="i_title" disabled /></td>
</tr>
<tr>
<td width="150" align="center" bgcolor="#c0d9fc">๋ด์ฉ</td>
<td><textarea name="content" rows="20" cols="60"
id="i_content" disabled>${article.contents}</textarea></td>
</tr>
<tr>
<td width="20%" align="center" bgcolor="#c0d9fc">๋ฑ๋ก์ผ์</td>
<td><input type="text" value="${article.writeDate}" disabled /></td>
</tr>
<tr id="tr_btn_modify">
<td colspan="2" align="center"><input type="button"
value="์์ ๋ฐ์ํ๊ธฐ" onclick="fn_modify_article(frmArticle)" /> <input
type="button" value="์ทจ์" onclick="backToList(frmArticle)" /></td>
</tr>
<tr id="tr_btn">
<td colspan="2" align="center"><br> <input type="button"
value="์์ ํ๊ธฐ" onclick="fn_enable()" /> <input
type="button" value="์ญ์ ํ๊ธฐ"
onclick="fn_remove_article('${contextPath}/board/removeArticle', ${article.articleNo} })" />
<input type="button" value="๋ฆฌ์คํธ๋ก ๋์๊ฐ๊ธฐ"
onclick="backToList(frmArticle)" /></td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
โweb.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0">
<display-name>BoardProject</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextClass</param-name>
<param-value>
org.springframework.web.context.support.AnnotationConfigWebApplicationContext
</param-value>
</init-param>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
com.gyuone.config.MvcConfig
com.gyuone.config.ControllerConfig
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gyuone</groupId>
<artifactId>BoardProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
</plugin>
</plugins>
</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet.jsp/javax.servlet.jsp-api -->
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.3</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet/jstl -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.3.22</version>
</dependency>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.29</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.5.10</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>2.0.7</version>
</dependency>
</dependencies>
</project>
'IT > WEB' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[40์ผ์ฐจ] logback (0) | 2022.08.17 |
---|---|
[40์ผ์ฐจ] ๊ฒ์ํ ๋ง๋ค๊ธฐ(3) delete. update ์ถ๊ฐ ๐ ์ต์ข ๊ฒ์ํ ๋ง๋ค๊ธฐ (0) | 2022.08.17 |
[38์ผ์ฐจ] ๊ฒ์ํ ๋ง๋ค๊ธฐ (0) | 2022.08.12 |
[38์ผ์ฐจ] FirstSpring (0) | 2022.08.12 |
[38์ผ์ฐจ] AOP/ aop concert project (0) | 2022.08.12 |
๋๊ธ