박민혁 박민혁 2024-01-15
240115 박민혁 commit
@e18d0fa95e363e6cdf2d5e1f86533a57c0734e9d
 
.gitignore (added)
+++ .gitignore
@@ -0,0 +1,13 @@
+/target/
+/.idea/
+/.classpath
+/.project
+/.settings
+/.jsdtscope
+/org.eclipse.jdt.core.prefs
+/org.eclipse.wst.common.component
+/org.eclipse.wst.common.project.facet.core.xml
+/org.eclipse.wst.jsdt.ui.superType.container
+/org.eclipse.wst.jsdt.ui.superType.name
+/org.eclipse.wst.validation.prefs
+
 
client/WEB-INF/index.jsp (added)
+++ client/WEB-INF/index.jsp
@@ -0,0 +1,16 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: chlwj
+  Date: 2023-04-27
+  Time: 오후 12:34
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+    <head>
+        <title>spring edu</title>
+    </head>
+    <body>
+        Hello World
+    </body>
+</html>(파일 끝에 줄바꿈 문자 없음)
 
client/WEB-INF/web.xml (added)
+++ client/WEB-INF/web.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
+         version="4.0">
+
+    <display-name>project-setting-manual</display-name>
+
+
+</web-app>(파일 끝에 줄바꿈 문자 없음)
 
client/views/index.html (added)
+++ client/views/index.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+Hello World
+
+<script>
+    console.log('Hello World');
+</script>
+</body>
+</html>(파일 끝에 줄바꿈 문자 없음)
 
pom.xml (added)
+++ pom.xml
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    작성자: 하석형
+    작성일: 230814
+    내용 : Maven Spring Legacy Proejct 세팅
+-->
+<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/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion><!-- modelVersion: Maven POM의 버전 -->
+    <groupId>kr.co.takensoft</groupId><!-- groupId: 기관(소속) 식별자 -->
+    <artifactId>Data_Quailty</artifactId><!-- artifactId: 현재 project의 식별자 -->
+    <name>Data_Quailty</name><!-- name: 현재 project의 명칭 -->
+    <packaging>war</packaging><!-- packaging: 어떤 파일 형식으로 패키징할 것인가를 정의, jar, war, exe 등이 올 수 있음 -->
+    <version>1.0.0-BUILD-SNAPSHOT</version><!-- version: 해당 artifact(컴포넌트)의 version, 뒤쪽 SNAPSHOT은 아직 개발 중임을 의미함 -->
+
+    <!-- properties: POM.xml에서 사용할 변수 -->
+    <properties>
+        <java-version>15</java-version>
+        <org.springframework.version>5.3.22</org.springframework.version>
+        <egovframework.rte.version>3.10.0</egovframework.rte.version>
+
+        <back-end-path>${project.basedir}/server</back-end-path>
+        <front-end-path>${project.basedir}/client</front-end-path>
+    </properties>
+
+
+    <!-- repositories: 라이브러리를 다운로드 받을 위치들을 설정 하는 곳 -->
+    <repositories>
+        <!-- repository: 라이브러리를 다운로드 받을 위치 설정, 기술되지 않을 시 기본적인 위치: https://repo1.maven.org/maven2/ -->
+        <!-- Apache재단 Maven 의존성 라이브러리 저장소 -->
+        <repository>
+            <id>mvn2s</id>
+            <url>https://repo1.maven.org/maven2/</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+        <!-- 전자정부프레임워크 Maven 의존성 라이브러리 저장소 -->
+        <repository>
+            <id>egovframe</id>
+            <url>https://repo.maven.apache.org/maven2/</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+    </repositories>
+
+
+    <!-- dependencies: 의존성 라이브러리들을 설정하는 곳 -->
+    <dependencies>
+
+        <!-- servlet 라이브러리 -->
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>4.0.1</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- Spring Framwork 라이브러리 - 해당 라이브러리 다운로드 시 core, context, beans, expression, web, aop, jcl 이 같이 다운 받아짐 -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-webmvc</artifactId>
+            <version>${org.springframework.version}</version>
+        </dependency>
+        <!-- Spring Framwork JDBC 라이브러리 - 특정 JDBC를 Bean 등록 해야 한다면 꼭 필요 함 -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-jdbc</artifactId>
+            <version>${org.springframework.version}</version>
+        </dependency>
+
+        <!-- JSON Parsing 라이브러리 - 해당 라이브러리 다운로드 시 core, annotations 이 같이 다운 받아짐 -->
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>2.13.3</version>
+        </dependency>
+
+        <!-- DB Connection Pool : HikariCP -->
+        <dependency>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+            <version>5.0.1</version>
+        </dependency>
+
+        <!-- JDBC : MariaDB -->
+        <dependency>
+            <groupId>org.mariadb.jdbc</groupId>
+            <artifactId>mariadb-java-client</artifactId>
+            <version>3.0.7</version>
+        </dependency>
+        <!-- JDBC : PostgreSQL -->
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <version>42.5.0</version>
+        </dependency>
+
+        <!-- SQL 작성 및 DBCP, JDBC 인터페이스 기능 담당 라이브러리 Mybatis -->
+        <dependency>
+            <groupId>org.mybatis</groupId>
+            <artifactId>mybatis</artifactId>
+            <version>3.5.10</version>
+        </dependency>
+
+        <!-- SQL 작성 및 DBCP, JDBC 인터페이스 기능 담당 라이브러리 Mybatis(SpringFramework와 인터페이스 용) - 해당 라이브러리 활용 시 의존성 라이브러리's mybatis, spring-context, spring-jdbc, spring-batch-infrastructure -->
+        <dependency>
+            <groupId>org.mybatis</groupId>
+            <artifactId>mybatis-spring</artifactId>
+            <version>2.0.7</version>
+        </dependency>
+
+    </dependencies>
+
+
+    <!-- build: Compile ~ Depoly에 대한 과정을 설정하는 곳 -->
+    <build>
+        <!-- finalName: 최종 packaging된 file의 이름 -->
+        <finalName>ROOT</finalName>
+        <!-- directory: 빌드 경로 (다른 곳에서 ${deploy.path} 활용하면 됨) -->
+        <directory>${project.basedir}/target</directory>
+        <!-- sourceDirectory: Java 및 관련 자원 소스 경로 -->
+        <sourceDirectory>${back-end-path}/main/java</sourceDirectory>
+        <!-- testSourceDirectory: Test용 Java 소스 경로 -->
+        <testSourceDirectory>${back-end-path}/test/java</testSourceDirectory>
+        <!-- outputDirectory: 컴파일 후 .class 파일 저장 경로 -->
+        <outputDirectory>${build.directory}/classes</outputDirectory>
+
+        <!-- resources: JAVA File 이외의 자원들을 classpath로 설정하기 위한 곳 -->
+        <resources>
+            <resource>
+                <directory>${back-end-path}/main/resources</directory>
+            </resource>
+        </resources>
+
+        <!-- plugins: Maven Plugin을 설정하는 곳 -->
+        <plugins>
+            <!-- maven compile plugin -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.10.1</version>
+                <configuration>
+                    <source>${java-version}</source><!-- 소스코드 Java 버전 -->
+                    <target>${java-version}</target><!-- compile시 결과물 Java 버전 -->
+                </configuration>
+            </plugin>
+
+            <!-- maven war package plugin -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>3.3.2</version>
+                <configuration>
+                    <!-- webResources: web 관련 자원들의 (html, js, css 등..) 경로 -->
+                    <webResources>
+                        <resource>
+                            <directory>${front-end-path}</directory>
+                        </resource>
+                    </webResources>
+                    <!-- webappDirectory: package된 후 web관련 자원들이 배포될 경로 -->
+                    <!-- <webappDirectory>${build.directory}</webappDirectory>-->
+                    <!-- web.xml 경로 -->
+                    <webXml>client/WEB-INF/web.xml</webXml>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
 
server/main/java/common/util/bean/ApplicationContextProvider.java (added)
+++ server/main/java/common/util/bean/ApplicationContextProvider.java
@@ -0,0 +1,43 @@
+package common.util.bean;
+
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+/**
+ * @author 하석형
+ * @since 2023.08.21
+ *
+ * Spring 컨테이너(ApplicationContext)에 접근하기 위한 Class 입니다.
+ * ApplicationContextAware 구현체
+ */
+public class ApplicationContextProvider implements ApplicationContextAware {
+
+    /**
+     * 해당 어플리케이션의 인스턴스(bean)들의 정보를 담은 객체
+     */
+    private static ApplicationContext applicationContext;
+
+    /**
+     * @author 하석형
+     * @since 2023.08.21
+     *
+     * ApplicationContextAware를 구현하기 위한 메소드
+     * Spring 구동 시, 해당 Class가 스캔 당하면 applicationContext 객체가 생성됨
+     */
+    @Override
+    public void setApplicationContext(ApplicationContext ctx) throws BeansException {
+        applicationContext = ctx;
+    }
+
+    /**
+     * @author 하석형
+     * @since 2023.08.21
+     *
+     * applicationContext 객체 호출
+     */
+    public static ApplicationContext getApplicationContext() {
+        return applicationContext;
+    }
+
+}
 
server/main/java/common/util/bean/BeanUtil.java (added)
+++ server/main/java/common/util/bean/BeanUtil.java
@@ -0,0 +1,44 @@
+package common.util.bean;
+
+import org.springframework.beans.BeansException;
+
+/**
+ * ApplicationContextProvider에서 bean객체를 얻어 활용할 수 있도록 해주는 Util 입니다.
+ *
+ * @author 하석형
+ * @since 2023.08.21
+ */
+public class BeanUtil {
+
+    /**
+     * 해당 어플리케이션에서 스프링 컨테이너가 관리하는 bean으로 등록된 객체를 이름으로 호출
+     *
+     * @author 하석형
+     * @since 2023.08.21
+     */
+    public static Object getBean(String beanName) {
+        System.out.println("BeanUtil getBean(param (String) beanName : " + beanName + ")");
+        try {
+            return ApplicationContextProvider.getApplicationContext().getBean(beanName);
+        } catch (BeansException e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    /**
+     * 해당 어플리케이션에서 스프링 컨테이너가 관리하는 bean으로 등록된 객체를 객체의 타입으로 호출
+     *
+     * @author 하석형
+     * @since 2023.08.21
+     */
+    public static Object getBean(Class<?> classType) {
+        System.out.println("BeanUtil getBean(param (Class<?>) classType : " + classType.getName() + ")");
+        try {
+            return ApplicationContextProvider.getApplicationContext().getBean(classType);
+        } catch (BeansException e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+}(파일 끝에 줄바꿈 문자 없음)
 
server/main/java/kr/co/takensoft/projectSettingManual/test/dao/TestDAO.java (added)
+++ server/main/java/kr/co/takensoft/projectSettingManual/test/dao/TestDAO.java
@@ -0,0 +1,51 @@
+package kr.co.takensoft.projectSettingManual.test.dao;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * 테스트용 DAO 입니다.
+ *
+ * @author 하석형
+ * @since 2023.08.21
+ */
+//@Repository <-- Class 객체로 생성 해야 됨
+@Mapper
+public interface TestDAO {
+
+    /**
+     * todoList 데이터 조회
+     *
+     * @author 방선주
+     * @since 2024.01.09
+     */
+    public List<HashMap<String, Object>> selectTodoList (HashMap<String, Object> params) throws Exception;
+
+    /**
+      * todoList 데이터 등록
+      *
+      * @author 방선주
+      * @since 2024.01.09
+     */
+    public int insertTodoList(HashMap<String, Object> params) throws Exception;
+
+    /**
+      * todoList 데이터 삭제
+      *
+      * @author 방선주
+      * @since 2024.01.09
+      */
+    public int deleteTodoList(HashMap<String, Object> params) throws Exception;
+
+    /**
+      * todoList 데이터 수정
+      *
+      * @author 방선주
+      * @since 2024.01.09
+      */
+    public int updateTodoList(HashMap<String, Object> params) throws Exception;
+}(파일 끝에 줄바꿈 문자 없음)
 
server/main/java/kr/co/takensoft/projectSettingManual/test/service/TestService.java (added)
+++ server/main/java/kr/co/takensoft/projectSettingManual/test/service/TestService.java
@@ -0,0 +1,63 @@
+package kr.co.takensoft.projectSettingManual.test.service;
+
+import kr.co.takensoft.projectSettingManual.test.dao.TestDAO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.HashMap;
+import java.util.List;
+
+@Service
+public class TestService {
+
+    @Autowired
+    private TestDAO testDAO;
+
+    /**
+     * todoList 데이터 조회
+     *
+     * @author 방선주
+     * @since 2024.01.09
+     */
+    public List<HashMap<String, Object>> selectTodoList (HashMap<String, Object> params) throws Exception {
+        return testDAO.selectTodoList(params);
+    }
+
+    /**
+      * todoList 데이터 등록
+      *
+      * @author 방선주
+      * @since 2024.01.09
+      */
+    public int insertTodoList(HashMap<String, Object> params) throws Exception {
+        int result = testDAO.insertTodoList(params);
+        System.out.println("insertTodoList result: " + result);
+        return result;
+    }
+
+    /**
+      * todoList 데이터 삭제
+      *
+      * @author 하관우
+      * @since 2023.08.30
+      */
+    public int deleteTodoList(HashMap<String, Object> params) throws Exception {
+        int result = testDAO.deleteTodoList(params);
+        System.out.println("deleteTodoList result: " + result);
+        return result;
+    }
+
+    /**
+      * todoList 데이터 수정
+      *
+      * @author 하관우
+      * @since 2023.08.30
+      */
+    public int updateTodoList(HashMap<String, Object> params) throws Exception {
+        int result = testDAO.updateTodoList(params);
+        System.out.println("updateTodoList result: " + result);
+        return result;
+    }
+}(파일 끝에 줄바꿈 문자 없음)
 
server/main/java/kr/co/takensoft/projectSettingManual/test/web/TestController.java (added)
+++ server/main/java/kr/co/takensoft/projectSettingManual/test/web/TestController.java
@@ -0,0 +1,75 @@
+package kr.co.takensoft.projectSettingManual.test.web;
+
+import kr.co.takensoft.projectSettingManual.test.service.TestService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import java.util.HashMap;
+
+@Controller
+public class TestController {
+
+    @Autowired
+    private TestService testService;
+
+    /**
+     * todoList 테스트 데이터 조회
+     *
+     * @author 방선주
+     * @since 2024.01.09
+     */
+    @RequestMapping(value = "/selectTodoList.json", method = RequestMethod.POST)
+    public ModelAndView selectTodoList(@RequestBody HashMap<String, Object> params) throws Exception {
+        System.out.println("selectTodoList Controller");
+        ModelAndView mav = new ModelAndView("jsonView");
+        mav.addObject("result", testService.selectTodoList(params));
+        return mav;
+    }
+
+    /**
+     * todoList 데이터 등록
+     *
+     * @author 방선주
+     * @since 2024.01.09
+     */
+    @RequestMapping(value = "/insertTodoList.json", method = RequestMethod.POST)
+    public ModelAndView insertTodoList(@RequestBody HashMap<String, Object> params) throws Exception {
+        System.out.println("insertTodoList Controller" + params);
+        ModelAndView mav = new ModelAndView("jsonView");
+        mav.addObject("result", testService.insertTodoList(params));
+        return mav;
+    }
+
+    /**
+      * todoList 데이터 삭제
+      *
+      * @author 방선주
+      * @since 2024.01.09
+      */
+    @RequestMapping(value = "/deleteTodoList.json", method = RequestMethod.POST)
+    public ModelAndView deleteTodoList(@RequestBody HashMap<String, Object> params) throws Exception {
+        System.out.println("deleteTodoList Controller" + params);
+        ModelAndView mav = new ModelAndView("jsonView");
+        mav.addObject("result", testService.deleteTodoList(params));
+        return mav;
+    }
+
+    /**
+      * todoList 데이터 수정
+      *
+      * @author 방선주
+      * @since 2024.01.09
+      */
+    @RequestMapping(value = "/updateTodoList.json", method = RequestMethod.POST)
+    public ModelAndView updateTodoList(@RequestBody HashMap<String, Object> params) throws Exception {
+        System.out.println("updateTodoList Controller" + params);
+        ModelAndView mav = new ModelAndView("jsonView");
+        mav.addObject("result", testService.updateTodoList(params));
+        return mav;
+    }
+
+}(파일 끝에 줄바꿈 문자 없음)
 
server/main/java/spring/SpringStarter.java (added)
+++ server/main/java/spring/SpringStarter.java
@@ -0,0 +1,53 @@
+package spring;
+
+import org.springframework.web.WebApplicationInitializer;
+import org.springframework.web.context.ContextLoaderListener;
+import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
+import org.springframework.web.filter.CharacterEncodingFilter;
+import org.springframework.web.servlet.DispatcherServlet;
+
+import javax.servlet.FilterRegistration;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRegistration;
+
+/**
+ * SpringFramework Context 구동 Class
+ *
+ * @author 하석형
+ * @since 2023.08.14
+ */
+public class SpringStarter implements WebApplicationInitializer {
+
+    /**
+     * SpringFramework Context 구동 시, 동작하는 이벤트 기능 (web.xml의 기능을 대체함)
+     *
+     * @author 하석형
+     * @since 2022.08.14
+     */
+    @Override
+    public void onStartup(ServletContext servletContext) throws ServletException {
+
+        AnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext();
+        rootContext.register(
+                spring.config.RootContextConfig.class,//Root Context
+                spring.config.DataSourceContextConfig.class,//DataSource Context
+                spring.config.MybatisContextConfig.class//Mybatis Context
+        );
+        servletContext.addListener(new ContextLoaderListener(rootContext));
+
+        // Web(Servlet) Context
+        AnnotationConfigWebApplicationContext dispatcherContext = new AnnotationConfigWebApplicationContext();
+        dispatcherContext.register(spring.config.servlet.WebContextConfig.class);
+
+        // Dispatcher Servlet
+        ServletRegistration.Dynamic dispatcher = servletContext.addServlet("dispatcher", new DispatcherServlet(dispatcherContext));
+        dispatcher.setLoadOnStartup(1);
+        dispatcher.addMapping("/");
+
+        // Filter
+        FilterRegistration.Dynamic filter = servletContext.addFilter("encodingFilter", CharacterEncodingFilter.class);
+        filter.setInitParameter("encoding","utf-8");
+        filter.addMappingForServletNames(null,false,"dispatcher");
+    }
+}(파일 끝에 줄바꿈 문자 없음)
 
server/main/java/spring/config/DataSourceContextConfig.java (added)
+++ server/main/java/spring/config/DataSourceContextConfig.java
@@ -0,0 +1,53 @@
+package spring.config;
+
+import com.zaxxer.hikari.HikariConfig;
+import com.zaxxer.hikari.HikariDataSource;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * DB Connection 자원 관련 Bean 설정 Class
+ * DBCP: HikariCP
+ * JDBC: MariaDB or PostgreSQL
+ *
+ * @author 하석형
+ * @since 2023.08.21
+ */
+@Configuration
+public class DataSourceContextConfig {
+
+    /**
+     * HikariCP(DBCP) Config(설정 세팅) 객체 Bean 설정
+     *
+     * @author 하석형
+     * @since 2023.08.21
+     */
+    @Bean(name = "mainHikariConfig")
+    public HikariConfig getMainHikariConfig () {
+        HikariConfig hikariConfig = new HikariConfig();
+        /*MariaDB*/
+//        hikariConfig.setDriverClassName("org.mariadb.jdbc.Driver");
+//        hikariConfig.setJdbcUrl("jdbc:mariadb://localhost:3306/test");
+//        hikariConfig.setUsername("root");
+//        hikariConfig.setPassword("1234");
+
+        /* PostgreSQL*/
+        hikariConfig.setDriverClassName("org.postgresql.Driver");
+        hikariConfig.setJdbcUrl("jdbc:postgresql://localhost/postgres?currentSchema=public");
+        hikariConfig.setUsername("postgres");
+        hikariConfig.setPassword("1234");
+        return hikariConfig;
+    }
+
+    /**
+     * HikariCP(DBCP) 객체 Bean 설정
+     *
+     * @author 하석형
+     * @since 2023.08.21
+     */
+    @Bean(name = "mainHikariDataSource")
+    public HikariDataSource getMainHikariDataSource () {
+        HikariDataSource hikariDataSource = new HikariDataSource(getMainHikariConfig());
+        return hikariDataSource;
+    }
+}(파일 끝에 줄바꿈 문자 없음)
 
server/main/java/spring/config/MybatisContextConfig.java (added)
+++ server/main/java/spring/config/MybatisContextConfig.java
@@ -0,0 +1,94 @@
+package spring.config;
+
+import com.zaxxer.hikari.HikariDataSource;
+import common.util.bean.BeanUtil;
+import org.apache.ibatis.session.ExecutorType;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.apache.ibatis.type.TypeAliasRegistry;
+import org.mybatis.spring.SqlSessionFactoryBean;
+import org.mybatis.spring.SqlSessionTemplate;
+import org.mybatis.spring.mapper.MapperScannerConfigurer;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Mybatis 관련 Bean 설정 Class
+ *
+ * @author 하석형
+ * @since 2023.08.21
+ */
+@Configuration
+//@MapperScan(basePackages = {"kr.co.takensoft"}) <-- 이거 대신 mainMapperScannerConfigurer bean 등록
+public class MybatisContextConfig {
+
+    //Mybatis 동작 설정
+    //mybatis-config.xml 작성 대신 Class 활용
+    private class Configuration extends org.apache.ibatis.session.Configuration {
+        private Configuration() {
+            super();
+            super.setCacheEnabled(true);//mapper 캐시 전역 사용여부
+            super.setLazyLoadingEnabled(false);//mybatis 지연 로딩 사용여부
+            super.setMultipleResultSetsEnabled(true);//한개의 구문에서 여러개의 ResultSet 허용 여부
+            super.setUseColumnLabel(true);//컬럼명 대신 컬럼라벨 사용 여부
+            super.setUseGeneratedKeys(false);//키 자동 생성
+            super.setDefaultExecutorType(ExecutorType.SIMPLE);
+            super.setDefaultStatementTimeout(25000);
+            super.setCallSettersOnNulls(true);//조회 조회시, null값 무조건 허용
+
+            //Mybatis SQL 작성시, 자주 활용하는 Class 별칭 세팅
+            TypeAliasRegistry typeAliasRegistry = super.getTypeAliasRegistry();
+        }
+    }
+    //Mybatis 동작 설정 객체 생성
+    private Configuration configuration = new Configuration();
+
+    /**
+     * Main
+     * Mapper : SQL이 작성된 문서와, 작성된 SQL을 실행시킬 class(Mapper)를 매핑 시켜주기 위한 객체 Been 설정 (Main)
+     *
+     * @author 하석형
+     * @since 2023.08.21
+     */
+    @Bean(name = "mainMapperScannerConfigurer")
+    public MapperScannerConfigurer getMainMapperScannerConfigurer () {
+        MapperScannerConfigurer mapperScannerConfigurer = null;
+        mapperScannerConfigurer = new MapperScannerConfigurer();
+        mapperScannerConfigurer.setBasePackage("kr.co.takensoft.projectSettingManual");
+        mapperScannerConfigurer.setAnnotationClass(org.apache.ibatis.annotations.Mapper.class);//Annotation을 지정해 줘야 service interface 를 Mapper라고 인식하지 않음
+        mapperScannerConfigurer.setSqlSessionTemplateBeanName("mainSqlSessionTemplate");
+        return mapperScannerConfigurer;
+    }
+
+    /**
+     * Main
+     * Mybatis SqlSessionFactory Bean 설정
+     *
+     * @author 하석형
+     * @since 2023.08.21
+     */
+    @Bean(name = "mainSqlSessionFactory")
+    public SqlSessionFactory getMainSqlSessionFactory (ApplicationContext applicationContext) throws Exception {
+        SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
+        sqlSessionFactoryBean.setDataSource((HikariDataSource) BeanUtil.getBean("mainHikariDataSource"));
+        sqlSessionFactoryBean.setConfiguration(this.configuration);
+        sqlSessionFactoryBean.setMapperLocations(applicationContext.getResources("classpath:mybatis/main/*-SQL.xml"));
+        return sqlSessionFactoryBean.getObject();
+    }
+
+    /**
+     * Main
+     * Mybatis SqlSessionTemplate Bean 설정
+     *
+     * @author 하석형
+     * @since 2023.08.21
+     */
+    @Bean(name = "mainSqlSessionTemplate")
+    public SqlSessionTemplate getMainSqlSessionTemplate (ApplicationContext applicationContext) throws Exception {
+        SqlSessionTemplate sqlSessionTemplate = new SqlSessionTemplate(getMainSqlSessionFactory(applicationContext));
+        return sqlSessionTemplate;
+    }
+
+
+
+}(파일 끝에 줄바꿈 문자 없음)
 
server/main/java/spring/config/RootContextConfig.java (added)
+++ server/main/java/spring/config/RootContextConfig.java
@@ -0,0 +1,52 @@
+package spring.config;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import common.util.bean.ApplicationContextProvider;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.text.SimpleDateFormat;
+import java.util.TimeZone;
+
+/**
+ * 현 프로젝트의 Global 자원 관련 Bean 설정 Class
+ *
+ * @author 하석형
+ * @since 2023.08.14
+ */
+@Configuration
+public class RootContextConfig {
+    /**
+     * Spring Application Context 객체 Bean 설정
+     *
+     * @author 하석형
+     * @since 2023.08.24
+     */
+    @Bean(name = "applicationContextProvider")
+    public ApplicationContextProvider getApplicationContextProvider () {
+        ApplicationContextProvider applicationContextProvider = new ApplicationContextProvider();
+        return applicationContextProvider;
+    }
+
+    /**
+     * JSON Parser 라이브러리 Class Bean 설정
+     *
+     * @author 하석형
+     * @since 2023.08.24
+     */
+    @Bean(name = "objectMapper")
+    public ObjectMapper getObjectMapper() {
+        ObjectMapper mapper = new ObjectMapper();
+
+        //기본 날짜 포맷 비활성화
+        mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
+
+        //새로운 날짜 포맷 세팅
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        mapper.setDateFormat(dateFormat);
+        mapper.setTimeZone(TimeZone.getTimeZone("Asia/Seoul"));
+
+        return mapper;
+    }
+}(파일 끝에 줄바꿈 문자 없음)
 
server/main/java/spring/config/servlet/WebContextConfig.java (added)
+++ server/main/java/spring/config/servlet/WebContextConfig.java
@@ -0,0 +1,138 @@
+package spring.config.servlet;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import common.util.bean.ApplicationContextProvider;
+import common.util.bean.BeanUtil;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+import org.springframework.web.servlet.ViewResolver;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import org.springframework.web.servlet.view.BeanNameViewResolver;
+import org.springframework.web.servlet.view.InternalResourceViewResolver;
+import org.springframework.web.servlet.view.json.MappingJackson2JsonView;
+
+import java.text.SimpleDateFormat;
+import java.util.List;
+import java.util.TimeZone;
+
+/**
+ * Servlet 관련 설정 Class
+ *
+ * @author 하석형
+ * @since 2023.08.14
+ */
+@Configuration
+@EnableWebMvc
+@ComponentScan(basePackages = {"kr.co.takensoft"})
+public class WebContextConfig implements WebMvcConfigurer {
+
+    /**
+     * 1. 특정 URL(Path)에 대한 HTTP Request 처리를 DispatcherServlet이 담당하지 않도록 만들어 주는 설정 (html, js, css, file 등..)
+     * 2. Client가 접근하지 못하는 WEB-INF 폴더안에 위치해 있는 정적 자원에 Clien가 접근할 수 있도록 만들어 주는 설정
+     *
+     * @author 하석형
+     * @since 2023.08.14
+     */
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
+        registry.addResourceHandler("/views/**").addResourceLocations("/views/");
+    }
+
+    /**
+     * HTTP Request Param Converter
+     * ex) JSON text => JAVA Object, text => String, Binary text => byte[] 등... 여러 데이터 타입에 대한 설정 가능
+     * 현재 설정에서는 Spring의 기존 JSON Converter(MappingJackson2HttpMessageConverter)를 새로 덮어씌워 움
+     *  => 새로 덮어씌우는 MappingJackson2HttpMessageConverter에 프로젝트에서 설정한 ObjectMapper를 생성자로 넣어줌
+     * @author 하석형
+     * @since 2023.08.21
+     */
+    @Override
+    public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
+        converters.add(new MappingJackson2HttpMessageConverter((ObjectMapper) BeanUtil.getBean("objectMapper")));
+    }
+
+    /**
+     * Custom Bean Class ViewResolver를 제공해 주기 위한 Bean (파일 다운로드, JSON 등..)
+     *
+     * @author 하석형
+     * @since 2023.08.14
+     * @return BeanNameViewResolver
+     */
+    @Bean(name="beanView")
+    public BeanNameViewResolver getBeanView () {
+        BeanNameViewResolver beanView = new BeanNameViewResolver();
+        beanView.setOrder(0);
+        return beanView;
+    }
+
+    /**
+     * JSP ViewResolver를 제공해 주기 위한 Bean
+     *
+     * @author 하석형
+     * @since 2023.08.14
+     * @return InternalResourceViewResolver
+     */
+    @Bean(name="jspView")
+    public ViewResolver getJspView() {
+        InternalResourceViewResolver jspViewResolver = new InternalResourceViewResolver();
+        jspViewResolver.setPrefix("/WEB-INF");
+        jspViewResolver.setSuffix(".jsp");
+        jspViewResolver.setOrder(1);
+        return jspViewResolver;
+    }
+
+    /**
+     * JSON ViewResolver를 제공해 주기 위한 Bean
+     *
+     * @author 하석형
+     * @since 2023.08.21
+     * @return MappingJackson2JsonView
+     */
+    @Bean(name="jsonView")
+    public MappingJackson2JsonView getJsonView () {
+        ObjectMapper objectMapper = (ObjectMapper) BeanUtil.getBean("objectMapper");
+        MappingJackson2JsonView jsonView = new MappingJackson2JsonView(objectMapper);
+        jsonView.setExtractValueFromSingleKeyModel(true);
+        return jsonView;
+    }
+
+    /**
+     * Spring Application Context 객체 Bean 설정
+     *
+     * @author 하석형
+     * @since 2023.08.14
+     */
+    @Bean(name = "applicationContextProvider")
+    public ApplicationContextProvider getApplicationContextProvider () {
+        ApplicationContextProvider applicationContextProvider = new ApplicationContextProvider();
+        return applicationContextProvider;
+    }
+
+    /**
+     * JSON Parser 라이브러리 Class Bean 설정
+     *
+     * @author 하석형
+     * @since 2023.08.21
+     */
+    @Bean(name = "objectMapper")
+    public ObjectMapper getObjectMapper() {
+        ObjectMapper mapper = new ObjectMapper();
+
+        //기본 날짜 포맷 비활성화
+        mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
+
+        //새로운 날짜 포맷 세팅
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        mapper.setDateFormat(dateFormat);
+        mapper.setTimeZone(TimeZone.getTimeZone("Asia/Seoul"));
+
+        return mapper;
+    }
+}(파일 끝에 줄바꿈 문자 없음)
 
server/main/resources/mybatis/main/test-SQL.xml (added)
+++ server/main/resources/mybatis/main/test-SQL.xml
@@ -0,0 +1,66 @@
+<?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">
+
+
+<!--
+	작성자 : 하석형
+	작성일 : 2023.08.21
+	내용 : Sample Mapper 입니다.
+ -->
+<mapper namespace="kr.co.takensoft.projectSettingManual.test.dao.TestDAO">
+
+    <!--
+        작성자 : 방선주
+        작성일 : 2024.01.09
+        내용 :  todoList 데이터 조회
+     -->
+    <select id="selectTodoList" parameterType="HashMap" resultType="HashMap">
+        SELECT
+              todo_num
+            , todo_comment
+
+	    FROM
+	        todo_list
+    </select>
+
+    <!--
+        작성자 : 방선주
+        작성일 : 2024.01.09
+        내용 : todoList 데이터 등록
+     -->
+    <insert id="insertTodoList" parameterType="HashMap">
+        INSERT INTO todo_list
+        (
+            todo_comment
+        )
+        VALUES
+        (
+            #{todo_comment}
+        )
+    </insert>
+    <!--
+        작성자 : 방선주
+        작성일 : 2024.01.09
+        내용 : todoList 데이터 등록
+     -->
+    <delete id="deleteTodoList" parameterType="HashMap">
+        DELETE
+        FROM
+            todo_list
+        WHERE
+            todo_num = #{todo_num}
+    </delete>
+    <!--
+        작성자 : 방선주
+        작성일 : 2024.01.09
+        내용 : todoList 데이터 수정
+     -->
+    <update id="updateTodoList" parameterType="HashMap">
+        UPDATE todo_list
+        SET
+            todo_comment = #{todo_comment}
+        WHERE
+            todo_num = #{todo_num}
+    </update>
+
+</mapper>(파일 끝에 줄바꿈 문자 없음)
Add a comment
List