Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
A Sneak Peek at Spring Boot 2.0
By Madhura Bhave / Phil Webb
@madhurabhave23 / @phillip_webb
1
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons
Att...
Questions?
@madhurabhave23
@phillip_webb
#springone@s1p
https://github.com/mbhave/webflux-demo
https://github.com/mbhave/a...
Próxima SlideShare
Cargando en…5
×

What's new in Spring Boot 2.0

1.361 visualizaciones

Publicado el

SpringOne Platform 2017
Phil Webb, Pivotal

"Spring Boot 2.0 introduces a host of new features and whole lot of behind the scenes changes. This talk will cover all the major improvements, show you how to migrate and Boot 1.5 application and discuss some of the smaller tweaks and utilities that you might not be aware of.

We'll also cover some of the changes we made to the Spring Boot internals, discuss why we made them, and how they will help with future releases."

Publicado en: Tecnología
  • Sé el primero en comentar

What's new in Spring Boot 2.0

  1. 1. A Sneak Peek at Spring Boot 2.0 By Madhura Bhave / Phil Webb @madhurabhave23 / @phillip_webb 1
  2. 2. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Agenda • What’s New • Infrastructure upgrades • Spring Framework 5 • What’s Changed • Configuration properties • Gradle plugin • Actuator endpoints • What’s Evolving • Security • Metrics 2
  3. 3. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ What’s New • Infrastructure upgrades • Spring Framework 5 3
  4. 4. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ What’s New • Infrastructure upgrades • Spring Framework 5 4
  5. 5. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Infrastructure Upgrades 5 8+ 8+ 5.23
  6. 6. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ What’s New • Infrastructure Upgrades • Spring Framework 5 6
  7. 7. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Spring Framework 5 • Reactive Spring • Functional APIs • Kotlin support 7
  8. 8. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Spring Framework 5 • Reactive Spring • Functional APIs • Kotlin support 8
  9. 9. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Reactive Spring 9 😀
  10. 10. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Reactive Spring 10 😱 🐌
  11. 11. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Reactive Spring Blocking • Large thread pool required • Each request gets its own thread Non-Blocking • Small thread pool • Worker threads process events 11
  12. 12. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Reactive Spring Servlet Stack • Servlet container • Servlet API • Spring MVC Reactive Stack • Netty, Servlet 3.1, Undertow • Reactive HTTP layer (Reactive Streams) • Spring WebFlux 12
  13. 13. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Reactive Spring 13 Mono<T> Flux<T> Reactive Streams Project Reactor
  14. 14. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 14 Demo
  15. 15. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Reactive Spring • Non-blocking • Event driven at the center • More for scalability than speed • You can still use Spring MVC 15
  16. 16. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Spring Framework 5 • Reactive Spring • Functional APIs • Kotlin support 16
  17. 17. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Functional APIs 17 RouterFunction<?> route = route(GET("/person/{id}"), request -> { Mono<Person> person = Mono.justOrEmpty(request.pathVariable("id")) .map(Integer::valueOf) .then(repository::getPerson); return ServerResponse.ok().body(fromPublisher(person, Person.class)); }) .and(route(GET("/person"), request -> { Flux<Person> people = repository.allPeople(); return ServerResponse.ok().body(fromPublisher(people, Person.class)); })) .and(route(POST("/person"), request -> { Mono<Person> person = request.body(toMono(Person.class)); return ServerResponse.ok().build(repository.savePerson(person)); }));
  18. 18. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Spring Framework 5 • Reactive Spring • Functional APIs • Kotlin Support 18
  19. 19. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ What’s Changed • Configuration properties • Gradle plugin • Actuator endpoints 19
  20. 20. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ What’s Changed • Configuration properties • Gradle plugin • Actuator endpoints 20
  21. 21. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Configuration Properties • Relaxed binding rules stay the same • Uniform format for reading properties from the environment • Elements separated by dots • Must be alpha-numeric • Must be lowercase • Hyphen can be used to separate words 21 my.foo.hello-world my.foo.helloWorld my.foo.hello_world my.foo.helloworld
  22. 22. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Configuration Properties • Indices in environment variables MY_VAR_1=a my.var[1] MY_VAR_1_2=b my.var[1][2] • Consistent behavior for Collections • Better types, e.g. Duration “1s” “2m” “5d” • Origin support 22
  23. 23. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 23 Demo
  24. 24. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ What’s Changed • Configuration properties • Gradle plugin • Actuator endpoints 24
  25. 25. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Gradle Plugin •bootRepackage replaced by bootJar & bootWar • Tasks do not figure out what to do • Plugin configures the tasks with sensible defaults • Reacts to other plugins • Explicit dependency management 25
  26. 26. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ What’s Changed • Configuration properties • Gradle plugin • Actuator endpoints 26
  27. 27. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Actuator Endpoints • Endpoint annotations •@Endpoint, @WebEndpoint, @JmxEndpoint • Tech independent operations •@ReadOperation, @WriteOperation, @DeleteOperation • Tech specific extensions •@EndpointWebExtension, @EndpointJmxExtension 27
  28. 28. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Actuator Endpoints • Works with: • Spring MVC • Jersey • Spring WebFlux • Reactive health indicators 28
  29. 29. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ What’s Evolving • Metrics • Security 29
  30. 30. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ What’s Evolving • Metrics • Security 30
  31. 31. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Metrics • Auto-configuration for metrics instrumentation by Micrometer * • Hierarchical metrics replaced by dimensional metrics • Facade over multiple monitoring systems 31 * Introducing Micrometer Application Metrics - (Thursday 10:30am)
  32. 32. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ What’s Evolving • Metrics • Security 32
  33. 33. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Security • Simpler security auto-configuration • Auto-configuration backs-off easily • Adding custom security is easy • No ordering issues with WebSecurityConfigurerAdapter • RequestMatchers for static resources and actuators • Web actuator endpoints have consistent behavior 33
  34. 34. Unless otherwise indicated, these slides are © 2013 -2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Security • OAuth 2.0 • Moving to Spring Security 5.0 • Support for multiple client registrations • Authorization server/Resource server support 34
  35. 35. Questions? @madhurabhave23 @phillip_webb #springone@s1p https://github.com/mbhave/webflux-demo https://github.com/mbhave/actuator-demo https://github.com/mbhave/configuration-properties-demo

×