● build.gradle //-- 추가 // https://mvnrepository.com/artifact/org.mybatis/mybatis implementation("org.mybatis:mybatis:3.5.7") implementation("org.mybatis:mybatis-spring:2.0.6") implementation("org.springframework:spring-jdbc:5.3.20") implementation("org.springframework:spring-tx:5.3.20") ● webapp / WEB-INF /spring / root-context.xml ..... 추가 ..
● Java에서 사용되는 데이터베이스 커넥션 풀(Connection Pool) 라이브러리 ● CP : Connection Pool의 약자 ● build.gradle 추가 // https://mvnrepository.com/artifact/com.zaxxer/HikariCP implementation 'com.zaxxer:HikariCP:5.0.0' ● webapp / WEB-INF / spring / root-context.xml ● 테스트 ○ example / DITests.java //추가 @Auto..
● build.gradle //-- 추가 implementation("mysql:mysql-connector-java:8.0.30") ● db 연결 테스트 ○ myfirstspring / example / JDBCTestx.java package com.myfirstspring.example;import org.junit.jupiter.api.DisplayName;import org.junit.jupiter.api.Test;import java.sql.Connection;import java.sql.DriverManager;import java.sql.SQLException;public class JDBCTests { @Test @DisplayName("db 연동 실..
● Dependency Injection ● src/main/ java/ com / mufirstspring /example ● example / Chef.javapackage com.myfirstspring.example;import lombok.ToString;import org.springframework.stereotype.Component;@Component@ToStringpublic class Chef {} ● example / Restaurant.java package com.myfirstspring.example;import lombok.RequiredArgsConstructor;import org.springframework.stereotype.Component;@..
□ 스프링 및 톰캣 설치 및 실행 ● 스프링 5.X 버전 ● 톰캣 9.0.X 버전 https://tomcat.apache.org/download-90.cgi Apache Tomcat® - Apache Tomcat 9 Software DownloadsWelcome to the Apache Tomcat® 9.x software download page. This page provides download links for obtaining the latest version of Tomcat 9.0.x software, as well as links to the archives of older releases. Unsure which version you need? ..