How do I know which dependencies to include?

I am new to Java / Spring and trying to build a simple application that will include some basic CRUD operations, and I would like to use Hibernate to access the data.

I use Maven as a build tool. My question is: how can I find out what dependencies are needed to use Hibernate? For example, I am using Spring 3.0.6, but how do I know which version of Hibernate to use with this version of Spring? Moreover, if there are several possible Hibernate dependencies, how can I find out which of them need to be turned on for the functionality I need? So far, this seems to be partly a reading of the documentation and partly trial and error.

Is there a final way to find out which Maven dependencies to use with a specific version of other dependencies? Any dependencies to use for certain bits of functionality?

Thank,

James.

+5
source share
4 answers

I follow these steps when I start using the new structure:

+4

Maven - . , Hibernate pom; Spring .

, Spring , pom; .

/ , ?

+1

, , - . Maven , , Java-. - , , .

, mvn dependency:tree , , mvn dependency:analyze.

0

, .

hibernate spring core, context, tx.

, , , , , - .

The attempt and error do not sound good, but its work is well suited for spring dependencies.

0
source

All Articles