스프링부트에서 특정 dependency 추가 시, 버전을 명시했더니
Duplicating managed version 1.15 for commons-codec
와 같은 경고 문구가 떴다.
해석: commons-codec 디펜던시의 버전 1.15에 대한 관리가 중복인 상태임.
원인:
스프링 부트는 디펜던시 추가시
버전 명시 없이도 현재 사용중인 스프링부트의 버전에 맞는 버전으로 의존성이 주입되기 때문에
버전을 별도로 명시하면 중복으로 버전이 관리된다는 뜻이다.
따라서 별도로 버전을 명시하지 않아도 된다.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
pom.xml의 parent 부분에 의해 추가한 디펜던시마다 알맞은 버전으로 의존성이 주입된다.
따라서 다음과 같이 버전을 명시하지 않아도,
이렇게 알맞은(현재 사용중인 스프링부트 버전에 맞는) 디펜던시의 버전이 추가되게 된다.
참고:
반응형
'etc > Spring' 카테고리의 다른 글
springboot에서 DB연결 테스트 (0) | 2022.10.27 |
---|---|
springboot jar파일 실행시 로그 파일 남기기 (0) | 2022.10.27 |
spring boot 스프링 부트 프로젝트 생성하기 (0) | 2022.10.08 |
@alias 어노테이션 (0) | 2022.07.18 |
[이클립스] Spring MVC 프로젝트 생성 (0) | 2022.06.02 |