Spring Framework
0. Spring Framework 시작하기(설정)
뚜비콩
2018. 1. 9. 10:24
스프링이란 보통 스프링 프레임워크를 말하는데, DI 지원, AOP 지원, MVC 웹 프레임워크 제공, JDBC/JPA 등 DB연동 지원 등의 기능이 주요 특징이다.
- Maven: 프로젝트 형상관리 automatically
- how to?(Dynamic project ro Maven Project) Project>우클릭>config>convert to Maven Project
spring.io>PROJECT>Spring Framework
//스프링 관련 라이브러리를 긁어와서 쓰면 됩니다.
<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>Spring1705</groupId> <artifactId>Spring1705</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <build> <sourceDirectory>src</sourceDirectory> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.6</version> <configuration> <warSourceDirectory>WebContent</warSourceDirectory> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin> </plugins> </build> <dependencies><!-- dependency-tree --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>5.0.2.RELEASE</version> </dependency> </dependencies> </project>
http://mvnrepository.com/ >
Spring TestContext Framework » 5.0.2.RELEASE
<dependency><!-- https://mvnrepository.com/artifact/org.springframework/spring-test --> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>5.0.2.RELEASE</version> <scope>test</scope> </dependency>
DI란? 의존성을 최대한 낮추는 작업. 외부 환경이 바뀌더라도 내부가 받는 영향을 최소화 시키기 위한 작업.