aspose file tools*
The moose likes Spring and the fly likes Help: Spring Data JPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Help: Spring Data JPA " Watch "Help: Spring Data JPA " New topic
Author

Help: Spring Data JPA

Daniel Ross
Greenhorn

Joined: Nov 26, 2010
Posts: 10
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

Joined: Feb 05, 2001
Posts: 17260
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help: Spring Data JPA