본문 바로가기
Spring & Spring Boot

Spring(Legacy) 초기 설정 - STS.exe

by minNa2 2023. 6. 29.

[ 새 프로젝트 생성 ]

Spring MVC Project → setting(package 명 입력)

 

 

 

[ pom.xml 변경해야하는 것 ]

<java-version>11</java-version>
<org.springframework-version>5.0.7.RELEASE</org.springframework-version>

 

log4j에서 주석 처리
<!-- <scope>runtime</scope> -->

 

Servlet 버전 변경
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>

 

Test 변경(junit 버전 변경)
<version>4.12</version>

 

junit 밑에 사용할 라이브러리 추가(/dependencies 안)
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.0</version>
<scope>provided</scope>
</dependency>

<!-- 트랜잭션 사용 -->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-tx -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${org.springframework-version}</version>
<!-- <version>5.0.7</version> -->
</dependency>

<!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${org.springframework-version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.springframework/spring-test -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${org.springframework-version}</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/com.zaxxer/HikariCP -->
<dependency>
    <groupId>com.zaxxer</groupId>
    <artifactId>HikariCP</artifactId>
    <version>2.7.8</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
<dependency>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis</artifactId>
    <version>3.4.6</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring -->
<dependency>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis-spring</artifactId>
    <version>1.3.2</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.bgee.log4jdbc-log4j2/log4jdbc-log4j2-jdbc4.1 -->
<!-- 콘솔 창에 데이터 다 찍힘 -->
<dependency>
    <groupId>org.bgee.log4jdbc-log4j2</groupId>
    <artifactId>log4jdbc-log4j2-jdbc4.1</artifactId>
    <version>1.16</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjrt -->
<dependency>
    <groupId>org.aspectj</groupId>
    <artifactId>aspectjrt</artifactId>
    <version>1.9.5</version>
    <!-- <scope>runtime</scope> -->
</dependency>

라이브러리 추가 끝

 

<configuration>
    <source>11</source>
    <target>11</target>
    <compilerArgument>-Xlint:all</compilerArgument>
    <showWarnings>true</showWarnings>
    <showDeprecation>true</showDeprecation>
</configuration>

 

===========> Maven > Update Project

 

 

 

[ Server(Tomcat) 변경해야하는 것 ]

해당 챕터만 ADD > Modules > Path 를 / 로 수정

 

 

 

[ ojdbc 추가 ]

Project 선택 해서 ojdbc6.jar Build Path   Deployment Assembly   

방금 빌드 패스한 것 ADD   Java Build Path ~~~ 선택   jar 파일 선택

반응형

'Spring & Spring Boot' 카테고리의 다른 글

DI_1  (0) 2023.07.03
Java 정리 - Spring (계속 추가)  (0) 2023.06.29
MVC(Model, View, Controller) 개념  (0) 2023.06.29
DI(Dependency Injection) 개념  (0) 2023.06.29
Spring(Legacy) 개념  (0) 2023.06.29