permaculture playing cards
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

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Help: Spring Data JPA " Watch "Help: Spring Data JPA " New topic

Help: Spring Data JPA

Daniel Ross

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?

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17271

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.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Help: Spring Data JPA
It's not a secret anymore!