Reputation: 22446
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.
Upvotes: 14
Views: 10306
Reputation: 1144
Please note that there may be couple of versions related to Spring ecosystem, like:
SpringBootVersion.getVersion()
Upvotes: 2
Reputation: 22446
Yes, its
org.springframework.core.SpringVersion.getVersion()
Upvotes: 26