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

Jakarta EE Guide for Spring Developers

ivargrimstad
September 13, 2023

Jakarta EE Guide for Spring Developers

Jakarta EE 9 changed its package namespace from javax.* to jakarta.*. It has significant repercussions across the entire Java ecosystem, including Spring. Spring Framework 6 and Spring Boot 3, which are supported by Tomcat 10 and Jetty 11, adopt Jakarta EE 9 APIs. This session is aimed to guide Spring developers through this transition seamlessly. A live coding demonstration using a Spring application on Open Liberty will dive into the steps involved and highlight areas requiring special attention.

ivargrimstad

September 13, 2023
Tweet

More Decks by ivargrimstad

Other Decks in Programming

Transcript

  1. Ivar Grimstad
 Jakarta EE Developer Advocate Eclipse Foundation Jakarta EE

    Guide for Spring Developers Emily Jiang
 Cloud Native Architect and Advocate, STSM, IBM
  2. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Speci fi cation Document API TCK Final Speci fi cation Compatible Implementation(s) Speci fi
  3. Jakarta EE 10 Web Pro fi Jakarta EE 10 Platform

    Updated Not Updated New Authorization 2.1 Activation 2.1 Batch 2.1 Connectors 2.1 Mail 2.1 Messaging 3.1 Enterprise Beans 4.0 RESTful Web Services 3.1 JSON Processing 2.1 JSON Binding 3.0 Annotations 2.1 CDI Lite 4.0 Interceptors 2.1 Dependency Injection 2.0 Servlet 6.0 Server Pages 3.1 Expression Language 5.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.0 WebSocket 2.1 Enterprise Beans Lite 4.0 Persistence 3.1 Transactions 2.0 Managed Beans 2.0 CDI 4.0 Authentication 3.0 Concurrency 3.0 Security 3.0 Bean Validation 3.0
  4. Jakarta EE 10 Core Pro fi Jakarta EE 10 Web

    Pro fi le Updated Not Updated New RESTful Web Services 3.1 JSON Processing 2.1 JSON Binding 3.0 Annotations 2.1 CDI Lite 4.0 Interceptors 2.1 Dependency Injection 2.0 Servlet 6.0 Server Pages 3.1 Expression Language 5.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.0 WebSocket 2.1 Enterprise Beans Lite 4.0 Persistence 3.1 Transactions 2.0 Managed Beans 2.0 CDI 4.0 Authentication 3.0 Concurrency 3.0 Security 3.0 Bean Validation 3.0
  5. Jakarta EE 10 Core Pro fi le Updated Not Updated

    New RESTful Web Services 3.1 JSON Processing 2.1 JSON Binding 3.0 Annotations 2.1 CDI Lite 4.0 Interceptors 2.1 Dependency Injection 2.0
  6. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Jakarta EE 10 API source level: Java SE 11 API binary level: Java SE 11 TCK run with: Java SE 11+17 App Developers (YOU) can use Java SE 17 features if you like!!
  7. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) How is this Relevant to ?
  8. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) builds on
  9. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) javax.* -> jakarta.*
  10. Authorization 2.1 Activation 2.1 Batch 2.1 Connectors 2.1 Mail 2.1

    Messaging 3.1 Enterprise Beans 4.0 RESTful Web Services 3.1 JSON Processing 2.1 JSON Binding 3.0 Annotations 2.1 CDI Lite 4.0 Interceptors 2.1 Dependency Injection 2.0 Servlet 6.0 Server Pages 3.1 Expression Language 5.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.0 WebSocket 2.1 Enterprise Beans Lite 4.0 Persistence 3.1 Transactions 2.0 Managed Beans 2.0 CDI 4.0 Authentication 3.0 Concurrency 3.0 Security 3.0 Bean Validation 3.0 Jakarta EE 10 Web Pro fi le Updated Not Updated New
  11. UUID as Basic Java Type @Entity public class Item {

    @Id @GeneratedValue(strategy=GenerationType.UUID) private java.util.UUID id; private String description; … }
  12. Authorization 2.1 Activation 2.1 Batch 2.1 Connectors 2.1 Mail 2.1

    Messaging 3.1 Enterprise Beans 4.0 RESTful Web Services 3.1 JSON Processing 2.1 JSON Binding 3.0 Annotations 2.1 CDI Lite 4.0 Interceptors 2.1 Dependency Injection 2.0 Servlet 6.0 Server Pages 3.1 Expression Language 5.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.0 WebSocket 2.1 Enterprise Beans Lite 4.0 Persistence 3.1 Transactions 2.0 Managed Beans 2.0 CDI 4.0 Authentication 3.0 Concurrency 3.0 Security 3.0 Bean Validation 3.0 Jakarta EE 10 Platform Updated Not Updated New
  13. Authorization 2.1 Activation 2.1 Batch 2.1 Connectors 2.1 Mail 2.1

    Messaging 3.1 Enterprise Beans 4.0 RESTful Web Services 3.1 JSON Processing 2.1 JSON Binding 3.0 Annotations 2.1 CDI Lite 4.0 Interceptors 2.1 Dependency Injection 2.0 Servlet 6.0 Server Pages 3.1 Expression Language 5.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.0 WebSocket 2.1 Enterprise Beans Lite 4.0 Persistence 3.1 Transactions 2.0 Managed Beans 2.0 CDI 4.0 Authentication 3.0 Concurrency 3.0 Security 3.0 Bean Validation 3.0 Jakarta EE 10 Platform Updated Not Updated New
  14. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Demo
  15. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) New Spring App Scenario 1
  16. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Upgrade Spring App Scenario 2
  17. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) javax.* -> jakarta.*
  18. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) IDE
  19. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) 1. Update Spring version in pom.xml 2. Update Jakarta EE version in pom.xml 3. Fix the imports 
 
 
 
 https://github.com/ivargrimstad/jakartaee-spring
  20. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Upgrade Spring App Scenario 3 with Dependencies
  21. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) 1. Update Spring version in pom.xml 2. Update Jakarta EE version in pom.xml 3. Fix the imports 4. Repeat for Dependencies 
 
 
 https://github.com/ivargrimstad/jakartaee-spring
  22. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Upgrade Spring App Scenario 4 with External Dependencies
  23. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Transformation
  24. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) 1. Update Spring version in pom.xml 2. Update Jakarta EE version in pom.xml 3. Fix the imports 4. Repeat for Dependencies 5. Transform Libraries if necessary 
 
 https://github.com/ivargrimstad/jakartaee-spring
  25. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Additional Migration Steps
  26. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) 1. Update Spring version in pom.xml 2. Update Jakarta EE version in pom.xml 3. Fix the imports 4. Repeat for Dependencies 5. Transform Libraries if necessary 6. Rename properties pre fi xed with javax 7. Verify data and dynamic content https://github.com/ivargrimstad/jakartaee-spring
  27. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Open Liberty
  28. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Why is Spring Boot and Open Liberty a Good Combination?
  29. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Open Liberty supports Spring Boot 1.5, 2.0
  30. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Open Liberty 23.0.0.8-beta supports Spring Boot 3.0 https://openliberty.io/blog/2023/08/03/23.0.0.8-beta.html
  31. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Demo
  32. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Beyond 10
  33. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Jakarta EE 11 Coming H1, 2024
  34. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Release Cadence
  35. COPYRIGHT (C) 2022, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Jakarta Data Standardizes the repository pattern for data access https://jakarta.ee/speci fi cations/ NEW in Jakarta EE 11
  36. COPYRIGHT (C) 2022, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Jakarta NoSQL Standardizes integration with NoSQL databases https://jakarta.ee/speci fi cations/nosql/ Standalone
  37. COPYRIGHT (C) 2022, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Jakarta RPC Standardizes gRPC within Jakarta EE https://jakarta.ee/speci fi cations/rpc/ Standalone
  38. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Jakarta EE 11 API source level: Java SE 17 or 21 API binary level: Java SE 17 or 21 TCK run with: Java SE 21 Work in Progress
  39. COPYRIGHT (C) 2022, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Summary
  40. Jakarta EE 10 Platform Updated Not Updated New Authorization 2.1

    Activation 2.1 Batch 2.1 Connectors 2.1 Mail 2.1 Messaging 3.1 Enterprise Beans 4.0 RESTful Web Services 3.1 JSON Processing 2.1 JSON Binding 3.0 Annotations 2.1 CDI Lite 4.0 Interceptors 2.1 Dependency Injection 2.0 Servlet 6.0 Server Pages 3.1 Expression Language 5.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.0 WebSocket 2.1 Enterprise Beans Lite 4.0 Persistence 3.1 Transactions 2.0 Managed Beans 2.0 CDI 4.0 Authentication 3.0 Concurrency 3.0 Security 3.0 Bean Validation 3.0
  41. Jakarta EE 10 Core Pro fi le Updated Not Updated

    New RESTful Web Services 3.1 JSON Processing 2.1 JSON Binding 3.0 Annotations 2.1 CDI Lite 4.0 Interceptors 2.1 Dependency Injection 2.0
  42. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) How is Relevant to
  43. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) builds on
  44. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) javax.* -> jakarta.*
  45. COPYRIGHT (C) 2023, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) 1. Update Spring version in pom.xml 2. Update Jakarta EE version in pom.xml 3. Fix the imports 4. Repeat for Dependencies 5. Transform Libraries if necessary 6. Rename properties pre fi xed with javax 7. Verify data and dynamic content https://github.com/ivargrimstad/jakartaee-spring