Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determine Spring Version at runtime

Tags:

spring

Is there a way to determine my Spring Version at runtime? eg

log.info("I'm running spring version '{}'", SpringWhatever.getVersion());

Debug-level logging is not showing me anything.

Full background is that I can compile but am getting java.lang.NoSuchMethodError: org.springframework.context.support.PropertySourcesPlaceholderConfigurer.getAppliedPropertySources() at runtime.

like image 244
Roy Truelove Avatar asked Aug 31 '15 21:08

Roy Truelove


People also ask

How do I check my Spring version?

You cann check it in pom. xml file in <org. springframework-version> tag. Save this answer.

What version is Spring on?

What is the latest Spring Framework version? The current stable version, as of October 2022, is Spring 5.3.

What version of Spring does Spring Boot use?

Spring Boot 2.7. 5 requires Java 8 and is compatible up to and including Java 19. Spring Framework 5.3. 23 or above is also required.

What version of Java does Spring use?

As of Spring Framework 5.1, Spring requires JDK 8+ (Java SE 8+) and provides out-of-the-box support for JDK 11 LTS. Java SE 8 update 60 is suggested as the minimum patch release for Java 8, but it is generally recommended to use a recent patch release. Spring supports a wide range of application scenarios.


1 Answers

Yes, its

org.springframework.core.SpringVersion.getVersion()
like image 189
Roy Truelove Avatar answered Oct 20 '22 14:10

Roy Truelove