What's new in Spring Data?

What's new in Spring Data?

Slides of the talk I gave at Spring I/O 2016.

@springcentral

977c74bb044a9d4fa90b305824eda390?s=128

Oliver Drotbohm

May 19, 2016
Tweet

Transcript

  1. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What’s new in Spring Data ? 1 / olivergierke Oliver Gierke
  2. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 2
  3. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data
 Hopper / Gosling 3
  4. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Dependencies 4
  5. Release train – Spring Framework baselines 6 Gosling Evans Dijkstra

    Fowler March 2015 August 2014 September 2015 May 2014 Spring 4.0 Spring 4.0 Spring 4.1 Spring 3.2 Hopper March 2016 Spring 4.2
  6. Dependencies • Upgraded Spring Framework baseline to 4.3, Gosling on

    4.2 • Upgrade to Querydsl 4 • Support for Hibernate 5 and MongoDB Java driver 3.0 (Gosling) • Major upgrades for some store modules • Spring Data Neo4j 4.1 (on Neo4j OGM 2.0) • Spring Data Couchbase 2.1 (requiring Couchbase 2.2) • Spring Data Solr 2.0 (requiring Solr 5.5) • Spring Data Elasticsearch 2.0 (requiring Elasticsearch 2.2) • Release train BOM • Refer to Spring Data modules in matching versions, e.g. Gosling-SR4 7
  7. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data Commons 8
  8. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DEMO Java 8 Stream support 9
  9. Enhanced Java 8 support • CompletableFuture and ListenableFuture • Stream

    as repository return type • Leverages persistence provider specific API in JPA • Non-time-zoned JSR-310 types, ThreeTen back-port 10
  10. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DEMO Querydsl web support 11
  11. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DEMO Query by example 12
  12. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DEMO Projections on repository methods 13
  13. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data JPA 14
  14. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data MongoDB 15
  15. Spring Data MongoDB • SpEL support for @Query methods for

    MongoDB. • EvaluationContextProvider -> SPI for custom extension • Spring Security support for MongoDB • MongoDB Java driver 3.0 compatibility • Support for Java 8 Stream as query method return type • Support for calling JavaScript functions • Support for GeoJSON 16
  16. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data REST 17
  17. Spring Data REST • Automatic translation of Enum values and

    link titles • RepositoryEntityLinks to create links to search resources • Support for @Version -> ETag & conditional GETs and PUTs • @LastModifiedDate -> Last-Modified header • Improved JSON Schema support • HAL Browser • Custom POST form using the schema and JSON Editor • PagedResourcesAssembler exposes first and last links 18
  18. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data Redis 19
  19. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DEMO Redis repositories 20
  20. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Outlook 21
  21. Outlook • Method handles for property access in object mapping

    • Spring Data Cassandra to become a core module • Upgrade to Cassandra 3.0 • $max / $min support for MongoDB • Support for inbound projections using JSONPath / XPath (via XMLBeam) • Incremental updates in Redis repositories • Spring Data REST • Support for VND Error and RFC7807 (Problem details for HTTP APIs) 22
  22. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Feedback
 welcome! 23
  23. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Resources 24
  24. Resources • Slides – TBA • Spring Data examples –

    Repository @ GitHub • Spring Data wiki (Release trains, planning) – Wiki • Spring projects release calendar – Subscribable calendar • NEW: Find us on Gitter! 25