Prezi

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in the manual

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Spring Data REST

MelbJVM April Presentation about Spring Data REST
by Tarcio Saraiva on 2 April 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Spring Data REST

Thanks! Keep in touch! What am I going to talk about Spring Data REST Take you through what I've learned using Spring Data REST.

How I came across it
What it provides
How you can use it and..
How you should NOT use it A bit about me A dev just like you Spring Data /* ProjectRepository.java */

import org.springframework.data.jpa.repository.JpaRepository;
import org.tarciosaraiva.todo.domain.Project;

public interface ProjectRepository extends JpaRepository<Project, Long> {
// that's right, you don't need anything else
} So... Spring Data It is pretty cool.

Quick and easy to setup
CRUD operations
Convention over configuration Spring Data Yes, that's cool, then... @tarciosaraiva

au.linkedin.com/in/tarciosaraiva/

github.com/tarciosaraiva/

This preso
bit.ly/datarest Resources & Tools http://www.springsource.org/spring-data/rest

Spring Data - O'Reilly
Mark Pollack, Oliver Gierke, Thomas Risberg, Jon Brisbin, Michael Hunger

REST Shell
https://github.com/SpringSource/rest-shell

Postman
http://bit.ly/postmanrest Hadoop HTTP Neo4J MongoDB HBase JPA Spring Data <?xml version="1.0" encoding="UTF-8"?>
<beans ... xmlns:data="http://www.springframework.org/schema/data/jpa"
http://www.springframework.org/schema/data/jpa
http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">

<data:repositories base-package="org.tarciosaraiva.todo.repository" />

</beans> Repositories Service Controllers Spring Data Why can't I do something like that? Repositories Service Controllers Spring Data Or even, for that matter, create something like that? RepositoryController Spring Data REST Along come Spring Data REST!

Decorate your Repositories adding GET, POST, PUT and DELETE HTTP operations that support the database CRUD operations and make them available as REST endpoints. Spring Data REST What you get by default:

CRUD operations
Pagination
Sorting
HATEOAS
Hypermedia as the Engine of Application State Spring Data REST It's cool but it's not the solution to all of your problems.

HATEOAS can be tough!
Not suitable for all projects
Validation can be cumbersome
You are not in full control of the RepositoryController yourMyki 5 stars please service.getProject(1); projectRepository.get(1);
See the full transcript