electrode
electrode

Reputation: 285

how to know which versions of hibernate/spring data are used in spring-boot project?

i work with a spring-boot project,

 <parent>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-starter-parent</artifactId>
     <version>2.2.4.RELEASE</version>
 </parent>

How can i check.. :

could you explain me the good workflow in my Eclipse IDE to check this ?

Upvotes: 7

Views: 18992

Answers (4)

logbasex
logbasex

Reputation: 2242

Simple as that:

public static void main(String[] args) {
    System.out.println(org.hibernate.Version.getVersionString());
}

Upvotes: 0

Mani Dhillon
Mani Dhillon

Reputation: 1

In Eclipes IDE double click on your project . click on show in > terminal then write comand -> mvn dependency:tree hit enter you will see all the dependency of that project

Upvotes: 0

AJcodes
AJcodes

Reputation: 101

In your eclipse IDE when you open pom.xml, few tab like structures will come below like shown in below picture.

pic1

In this you can go to dependency hierarchy section which will show you both dependency hierarchy and resolved dependency. In resolved dependencies you can search for whichever jar you want like hibernate/spring-data and see which version is getting used. Below is a picture for your reference which shows commons-httpclient jar with version 2.0.2 getting used.

pic2

Upvotes: 1

Tsvetoslav Tsvetkov
Tsvetoslav Tsvetkov

Reputation: 1166

You have two options:

  • Using your IDE under Dependencies Section
  • Using terminal - mvn dependency:tree

Upvotes: 8

Related Questions