티스토리 뷰

spring

pom.xml

paulownia 2018. 9. 1. 19:39

<?xml version="1.0" encoding="UTF-8"?>

<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 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>org.joy</groupId>

<artifactId>controller</artifactId>

<name>app022</name>

<packaging>war</packaging>

<version>1.0.0-BUILD-SNAPSHOT</version>

<properties>

<java-version>1.8</java-version><!-- ...42, 73p. -->

<org.springframework-version>4.3.8.RELEASE</org.springframework-version>

<org.aspectj-version>1.6.10</org.aspectj-version>

<org.slf4j-version>1.6.6</org.slf4j-version>

</properties>

<dependencies>

<!-- Spring -->

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-context</artifactId>

<version>${org.springframework-version}</version>

<exclusions>

<!-- Exclude Commons Logging in favor of SLF4j -->

<exclusion>

<groupId>commons-logging</groupId>

<artifactId>commons-logging</artifactId>

</exclusion>

</exclusions>

</dependency>

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-webmvc</artifactId>

<version>${org.springframework-version}</version>

</dependency>

<!-- AspectJ -->

<dependency>

<groupId>org.aspectj</groupId>

<artifactId>aspectjrt</artifactId>

<version>${org.aspectj-version}</version>

</dependency>

<!-- Logging -->

<dependency>

<groupId>org.slf4j</groupId>

<artifactId>slf4j-api</artifactId>

<version>${org.slf4j-version}</version>

</dependency>

<dependency>

<groupId>org.slf4j</groupId>

<artifactId>jcl-over-slf4j</artifactId>

<version>${org.slf4j-version}</version>

<scope>runtime</scope>

</dependency>

<dependency>

<groupId>org.slf4j</groupId>

<artifactId>slf4j-log4j12</artifactId>

<version>${org.slf4j-version}</version>

<scope>runtime</scope>

</dependency>

<dependency>

<groupId>log4j</groupId>

<artifactId>log4j</artifactId>

<version>1.2.15</version>

<exclusions>

<exclusion>

<groupId>javax.mail</groupId>

<artifactId>mail</artifactId>

</exclusion>

<exclusion>

<groupId>javax.jms</groupId>

<artifactId>jms</artifactId>

</exclusion>

<exclusion>

<groupId>com.sun.jdmk</groupId>

<artifactId>jmxtools</artifactId>

</exclusion>

<exclusion>

<groupId>com.sun.jmx</groupId>

<artifactId>jmxri</artifactId>

</exclusion>

</exclusions>

<scope>runtime</scope>

</dependency>


<!-- @Inject -->

<dependency>

<groupId>javax.inject</groupId>

<artifactId>javax.inject</artifactId>

<version>1</version>

</dependency>

<!-- Servlet -->

<!--

...119p.스프링3.2부터는 jUnit만을 사용해서 컨트롤러를 테스트할 수 있는데,

   spring-test모듈을 사용할 때 가능하면 WAS의 Servlet스펙 버전을 일치시켜서 테스트할 것.

   테스트코드작성은 test폴더를 이용해서 작업하고, WAS를 실행하지 않고 컨트롤러를

   테스트하려면 pom.xml의 servlet버전을 높여줘야만 가능함.

...Caused by: java.lang.ClassNotFoundException: javax.servlet.SessionCookieConfig

   https://stackoverflow.com/questions/21561432/failed-to-load-applicationcontext-during-spring-unit-test

...Caused by: java.lang.ClassNotFoundException: javax.servlet.SessionCookieConfig

   http://www.cnblogs.com/canger/p/7875546.html

-->

<dependency>

<groupId>javax.servlet</groupId>

<artifactId>javax.servlet-api</artifactId>

<version>3.1.0</version>

</dependency>

<dependency>

<groupId>javax.servlet.jsp</groupId>

<artifactId>jsp-api</artifactId>

<version>2.1</version>

<scope>provided</scope>

</dependency>

<dependency>

<groupId>javax.servlet</groupId>

<artifactId>jstl</artifactId>

<version>1.2</version>

</dependency>

<!-- 

...74, 90p.Test

jUnit버전은 4.11 이상. 

-->

<dependency>

<groupId>junit</groupId>

<artifactId>junit</artifactId>

<version>4.12</version>

<scope>test</scope>

</dependency>


<!-- ...72p.156p.mySql -->

<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->

<dependency>

    <groupId>mysql</groupId>

    <artifactId>mysql-connector-java</artifactId>

    <version>8.0.11</version>

</dependency>


<!-- 

...82p.152p.mybatis

http://mvnrepository.com/artifact/org.mybatis/mybatis/3.4.5 

Spring과 MyBatis 사이에 두 프레임워크의 접착제 역할을 하는 모듈 추가.

mybatis, mybatis-spring, spring-jdbc, spring-test.

이후 root-context.xml에서 다양한 태그 사용가능함.

-->

<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->

<dependency>

    <groupId>org.mybatis</groupId>

    <artifactId>mybatis</artifactId>

    <version>3.4.5</version>

</dependency>

<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring -->

<dependency>

    <groupId>org.mybatis</groupId>

    <artifactId>mybatis-spring</artifactId>

    <version>1.3.1</version>

</dependency>

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-jdbc</artifactId>

<!-- <version>4.1.9.RELEASE</version>  -->

<version>${org.springframework-version}</version>

</dependency>

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-test</artifactId>

<version>${org.springframework-version}</version>

</dependency>


<!-- 

...116, 354, 400, 419, 563p.JSON, Jackson-databind 라이브러리를 검색했고,

적절한 객체를 반환하고, @ResponseBody 어노테이션을 추가함. 

-->

<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->

<dependency>

    <groupId>com.fasterxml.jackson.core</groupId>

    <artifactId>jackson-databind</artifactId>

    <version>2.9.5</version>

</dependency>


<!-- ...138p.

잘못된 SQL 또는 잘못된 속성이름으로 인한 예외발생시 자세한 로그 제공.

Log4jdbc Log4j2 Jdbc4 » 1.16

1. pom.xml 설정후 /WEB-INF/spring/root-context.xml에 datasource 설정변경.

2. /src/main/resources/log4jdbc.log4j2.properties 파일 추가.

3. /src/main/resources/logback.xml 파일 추가.

-->

<dependency>

<groupId>org.bgee.log4jdbc-log4j2</groupId>

<artifactId>log4jdbc-log4j2-jdbc4</artifactId>

<version>1.16</version>

</dependency>


<!-- 

...458p.

...스프링 AOP와 스프링 트랜잭션 처리를 위한 라이브러리 설정.

...스프링에서 AOP를 처리하기 위해서는 Proxy객체를 생성해야 함.

   스프링에서 Proxy객체를 만드는 2가지 방법.

1. JDK의 InvocationHandler를 이용한 Dynamic Proxy방식.

2. CGLIB를 이용한 방식.

   AOP기능을 적용하기 위해 AspectJ언어의 문법을 이용하므로 

   AspectJ라이브러리 설정.

...460p.

...스프링 AOP설정은 

1. 어노테이션을 이용한 설정.

2. XML을 이용하는 설정방식 : 

   servlet-context.xml 또는 root-context.xml에서 aop, tx 

   네임스페이스추가.

...    본 예제에서는 root-context.xml의 네임스페이스를 설정함.  

-->

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-tx</artifactId>

<version>${org.springframework-version}</version>

</dependency>

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-aop</artifactId>

<version>${org.springframework-version}</version>

</dependency>


<dependency>

<groupId>aspectj</groupId>

<artifactId>aspectjrt</artifactId>

<version>1.5.4</version>

</dependency>

<dependency>

<groupId>aspectj</groupId>

<artifactId>aspectjweaver</artifactId>

<version>1.5.4</version>

</dependency>

<!-- 

...520p.

   commons-fileupload : 파일업로드관련.

   imgScalr : 이미지를 축소할 수 있는 라이브러리. 

...553p.

...썸네일을 생성하는 코드는 Java2D를 이용할 수 있지만, 이미지 축소시 비율이나 해상도

...문제로 대부분은 imagemagick 또는 imageScalar와 같은 라이브러리를 활용함.

-->

<dependency>

<groupId>commons-fileupload</groupId>

<artifactId>commons-fileupload</artifactId>

<version>1.3.1</version>

</dependency>

<dependency>

<groupId>org.imgscalr</groupId>

<artifactId>imgscalr-lib</artifactId>

<version>4.2</version>

</dependency>

        

</dependencies>

    <build>

        <plugins>

            <plugin>

                <artifactId>maven-eclipse-plugin</artifactId>

                <version>2.9</version>

                <configuration>

                    <additionalProjectnatures>

                        <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>

                    </additionalProjectnatures>

                    <additionalBuildcommands>

                        <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>

                    </additionalBuildcommands>

                    <downloadSources>true</downloadSources>

                    <downloadJavadocs>true</downloadJavadocs>

                </configuration>

            </plugin>

            <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-compiler-plugin</artifactId>

                <version>2.5.1</version>

                <configuration>

                    <source>1.8</source>

                    <target>1.8</target>

                    <compilerArgument>-Xlint:all</compilerArgument>

                    <showWarnings>true</showWarnings>

                    <showDeprecation>true</showDeprecation>

                </configuration>

            </plugin>

            <plugin>

                <groupId>org.codehaus.mojo</groupId>

                <artifactId>exec-maven-plugin</artifactId>

                <version>1.2.1</version>

                <configuration>

                    <mainClass>org.test.int1.Main</mainClass>

                </configuration>

            </plugin>

        </plugins>

    </build>

</project>

'spring' 카테고리의 다른 글

@Transactional 애노테이션 속성  (0) 2018.09.27
트랜잭션 설정  (0) 2018.09.26
AOP, root-context 설정  (0) 2018.09.20
AOP 라이브러리, pom.xml  (0) 2018.09.20
HiddenHttpMethodFilter  (0) 2018.09.01
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함