스프링 프로젝트를 직접 생성하는 방법

Kim Jin Hyeok·2020년 11월 19일
0

이클립스에서의 프로젝트 생성이 아닌 직접 디렉토리 구조를 짜서 프로젝트를 생성할 때도 있다.

1. 폴더(java, resources)와 파일(pom.xml) 생성

2. pom.xml 기본 태그 삽입

<?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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>spring4</groupId>
	<artifactId>testPjt04001</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<dependencies>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>4.1.0.RELEASE</version>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<encoding>utf-8</encoding>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>

3. IDE에서 메이븐 프로젝트로 import

0개의 댓글