0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

spring-boot-dependenciesの依存性が古いversionになってしまった

0
Posted at

現象

spring-bootで以下のようにspring-boot-dependencies管理下の依存性を使う場合はversion無しでよしなに解決してくれるはず。それなのに、何故か古いversionのものが参照されてしまった。

build.gradle
implementation 'org.apache.commons:commons-lang3'

原因

spring-boot-dependenciesのversionを上書きしたい場合はビルドツールで以下の変数を上書きする。

したがって、例えば以下のようなgradle.propertiesが存在する場合はそのversionが使われる。

gradle.properties
commons-lang3.version = 3.18.0

補足

変数一覧は以下。

当然ながら特別な事情が無い限りはversionの上書きはオススメされない。

WARNING
Each Spring Boot release is designed and tested against a specific set of third-party dependencies. Overriding versions may cause compatibility issues and should be done with care.

https://docs.spring.io/spring-boot/gradle-plugin/managing-dependencies.html#managing-dependencies.dependency-management-plugin.customizing より抜粋

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?