Reputation: 1018
I am a devops engineer currently containerizing java applications for our backend team.
All projects are built with spring-boot and use either spring-boot v2 or (since they're older and more legacy) spring-boot v1.
I have built a spring-boot base image for them to run on and do some additional stuff based on the spring-boot version used.
Sadly for one of the projects I don't have any information if it's v1 or v2. Having no experience with neither java coding nor spring-boot I am at a loss at how to find out.
So the question is: Assuming the source code is present, how can I tell if a project is using spring-boot v2 or v1?
Thanks for your help java gurus!
Upvotes: 1
Views: 106
Reputation: 188
As you mentioned assuming you have source code, Check for the versions in the pom.xml file.
spring-boot-starter-parent
dependency version to be 2.0.0 or higher and,spring framework
version downloaded to be 5Edit:
If you can run the application, you can also check version with the ascii art that printed out, assuming no customization made:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.3.RELEASE)
Refer:
1. Difference between Springboot 1.X and Springboot 2.0
2. https://content.pivotal.io/springone-platform-2017/whats-new-in-spring-boot-2-0-phillip-webb-madhura-bhave
Upvotes: 2