• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help: Spring Data JPA

 
Daniel Ross
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope this is the right section.


I have been searching for examples, tutorials that can give step by step instructions on how to use JPA data in spring, however I didn't find anything so far.
Most of the examples are incomplete and I'm pretty new to spring.

Is it there any good example that shows how to use spring data jpa with maven possibly?

Thnanks
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean incomplete? There isn't much you need to do in configuration and in code. That is the greatest thing about all the Spring Data projects. Why not use the documentation directly on the Spring Data JPA website.

For dependencies above core Spring there is the Spring Data Commons jar and Spring Data JPA jar to include. Then you create a Repository interface extending one of Spring Data JPA interfaces. If you have unique queries that use @Query on top of one of your custom interface method declarations, in the xml file define <jpa:repositories base-package="package where those repository interfaces are"/> Had a bean for your datasource, transactionManager, EntityManager container. That's about it.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic