Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What's new in Spring Data?

What's new in Spring Data?

Slides of the talk I gave at JavaZone, 2016.

Oliver Drotbohm

September 07, 2016
Tweet

More Decks by Oliver Drotbohm

Other Decks in Programming

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 / Ingalls 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/ Infrastructure prerequisites 4
  5. Release train – Spring Framework baselines 5 Gosling Evans Dijkstra

    Fowler March 2015 August 2014 September 2015 May 2014 Spring 4.0 Spring 4.0 Spring 4.1 Spring 3.2
  6. 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
  7. November 2016 Spring 4.3 Ingalls Hopper March 2016 Spring 4.2

    Gosling Evans Fowler March 2015 August 2014 September 2015 Spring 4.0 Spring 4.0 Spring 4.1 Release train – Spring Framework baselines 7
  8. 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 8
  9. 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 9
  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 Java 8 Stream and CompletableFuture support 10
  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 Projections on repository methods 11
  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 Query by example 12
  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/ DEMO Querydsl web support 13
  14. Summary • Comprehensive 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 • Query-by-example for for simple matching scenarios • Projections on repository methods with adaptive querye execution optimizations 14
  15. 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
  16. 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
  17. 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
  18. 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
  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/ Spring Data Redis 19
  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/ DEMO Redis repositories 20
  21. 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
  22. Ingalls M1 • 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 22
  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/ DEMO JSONPath and XPath binding 23
  24. 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/ One more thing… 24
  25. 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 5
 is coming! 25
  26. 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/ Reactive
 Repositories 26
  27. 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 Reactive repositories with MongoDB 27
  28. 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! 28
  29. 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 29
  30. Resources • What’s new in Spring Data Hopper? – Blog

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