๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ’ปWEB BackEnd/ํ”„๋ ˆ์ž„์›Œํฌ Spring

ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ - (๋ฐฉ๋ฒ•2)๋กœ์ปฌ์—์„œ ์ง์ ‘ ์ƒ์„ฑ

๋กœ์ปฌ์—์„œ ํด๋”(java, resources)์™€ ํŒŒ์ผ(pom.xml)์„ ์ง์ ‘ ๋งŒ๋“ค์–ด ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋ฐฉ๋ฒ•

 

1) ํด๋”(java, resources)์™€ 

"ํ”„๋กœ์ ํŠธ ํด๋” > src ํด๋” > main ํด๋” > java, resources ํด๋”" ๋ชจ๋‘ ์ƒ์„ฑ

 

2) ํŒŒ์ผ(pom.xml) ์ƒ์„ฑ

srcํด๋”์™€ ๊ฐ™์€ ์œ„์น˜์— pom.xml ํŒŒ์ผ ์ƒ์„ฑ

<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>spring4</groupId>
  <artifactId>testPjt</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) ์ดํด๋ฆฝ์Šค์—์„œ importํ•˜๊ธฐ

์ดํด๋ฆฝ์Šค์—์„œ Maven์œผ๋กœ import