You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TIP: You should refer to Spring Boot's documentation on
599
+
{spring-boot-docs-html}/using.html#using.build-systems.dependency-management[Dependency Management] for more details.
600
+
601
+
[[sbdg-dependency-version-overrides-property]]
602
+
==== Version Property Override
603
+
604
+
Perhaps the easiest option to change the version of a Spring Boot managed dependency is to set the version property
605
+
used by Spring Boot to control the dependency's version to the desired Java library version.
606
+
607
+
For example, if you want to use a different version of **Log4j** than what is currently set and determined by
608
+
Spring Boot, then you would do:
609
+
610
+
.Maven dependency version property override
611
+
[source.java]
612
+
----
613
+
<properties>
614
+
<log4j2.version>2.17.2</log4j2.version>
615
+
</properties>
616
+
----
617
+
618
+
.Gradle dependency version property override
619
+
----
620
+
ext['log4j2.version'] = '2.17.2'
621
+
----
622
+
623
+
NOTE: The Log4j version number used in the Maven and Gradle examples shown above is arbitrary. You must set
624
+
the `log4j2.version` property to a valid Log4j version that would be resolvable by Maven or Gradle,
625
+
given the fully qualified artifact: `org.apache.logging.log4j:log4j:2.17.2`.
626
+
627
+
The version property name must precisely match the version property declared in the `spring-boot-dependencies`
628
+
Maven POM.
629
+
630
+
ifeval::["{version-snapshot}" == "true"]
631
+
See the https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-dependencies/{spring-boot-version}/spring-boot-dependencies-{spring-boot-version}.pom[spring-boot-dependencies POM]
632
+
containing version properties for all the dependencies managed by Spring Boot.
633
+
endif::[]
634
+
635
+
ifeval::["{version-milestone}" == "true"]
636
+
See the https://repo.spring.io/milestone/org/springframework/boot/spring-boot-dependencies/{spring-boot-version}/spring-boot-dependencies-{spring-boot-version}.pom[spring-boot-dependencies POM]
637
+
containing version properties for all the dependencies managed by Spring Boot.
638
+
endif::[]
639
+
640
+
ifeval::["{version-release}" == "true"]
641
+
See the https://repo.spring.io/artifactory/milestone/org/springframework/boot/spring-boot-dependencies/{spring-boot-version}/spring-boot-dependencies-{spring-boot-version}.pom[spring-boot-dependencies POM]
642
+
containing version properties for all the dependencies managed by Spring Boot.
643
+
endif::[]
644
+
645
+
More details can be found in the Spring Boot Maven Plugin
0 commit comments