레알윙 2020. 4. 2. 22:00
반응형

의존성 주입

 

1. pom.xml에서 dependency 추가

pom.xml에서 dependencies 안에 dependency를 추가 한다. 만약 버전을 맞추고 싶으면 버전 명시

메이븐 의존성를 알기 위해서는 https://mvnrepository.com/ 에서 찾아보자

 

 

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-mustache</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>org.junit.vintage</groupId>
					<artifactId>junit-vintage-engine</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>

 

 

2. org.springframework.boot:spring-boot-dependecies 수정

<properties> </properties> 안에 있는 버전들을 수정한다.

반응형