{"id":245,"date":"2022-12-04T18:25:27","date_gmt":"2022-12-04T18:25:27","guid":{"rendered":"https:\/\/valerio.nu\/?p=245"},"modified":"2022-12-04T18:25:27","modified_gmt":"2022-12-04T18:25:27","slug":"we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned","status":"publish","type":"post","link":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/","title":{"rendered":"We tried the new Spring Boot 3.0 and this is what we learned"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Introduction<\/strong><\/h2>\n\n\n\n<p>As technologies evolve, development should also evolve to keep pace and ensure security is maintained. <a href=\"https:\/\/spring.io\/blog\/2022\/11\/24\/spring-boot-3-0-goes-ga\">Spring Boot 3.0<\/a> was launched recently and we decided to give it a try. In this article, we explore briefly the new Spring Boot 3.0 and explain what has changed and how it affects you.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/valerio.nu\/wp-content\/uploads\/2022\/11\/dev_dashboard-1024x819.jpg\" alt=\"developer's dashboard for our Spring boot 3.0 solution.\" class=\"wp-image-247\" width=\"834\" height=\"565\" title=\"developer's dashboard\"\/><figcaption class=\"wp-element-caption\">Developers Dashboard<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Basic Requirements<\/strong><\/h2>\n\n\n\n<p>As always, Java Development Kit (JDK) is required to run every java application. The new spring boot comes with a baseline version, a minimum version required to run spring boot version 3.0. Spring boot 3.0 requires JDK version 17 installed on the client machine. <a href=\"https:\/\/www.oracle.com\/java\/technologies\/javase\/jdk17-archive-downloads.html\">JDK version 17<\/a><\/p>\n\n\n\n<p><strong>Support for GraalVM Base and Native Build Tools<\/strong><\/p>\n\n\n\n<p>The increasing demand for native-based development and compilation is not left out in Spring Boot 3.0 as it has been taken care of. <a href=\"https:\/\/www.graalvm.org\/latest\/reference-manual\/native-image\/\">GraalVM <\/a>Native Image is a technology developed to compile Java code ahead of time to a binary \u2013 a native executable. Recall that, a native executable will include only code required at run time, such as application classes, standard-library classes, the language runtime, and statically-linked native code from the JDK.<\/p>\n\n\n\n<p>Furthermore, GraalVM Native images provide a new way to deploy and run Java applications. If we compare this to the more traditional Java Virtual Machine, native images have the capacity to run with a smaller memory footprint, thus giving us speed and improved startup time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Support for third-party libraries<\/strong><\/h2>\n\n\n\n<p>As this is a major version introduction, support for libraries used in previous versions was improved. As always, Spring Framework 6 is highly recommended and supported as well as a host of other libraries that were upgraded. Some of the upgraded Libraries include:<br>     1. Spring Batch 5.0: a framework that provides batch processing of records ability.<br>     2. Spring Kafta 3.0: a fault tolerant-messaging project.<br>     3.  Spring Session 3.0: a tool for managing HTTP sessions.<br>Other libraries can be found in the Spring Boot 3.0 release note.<\/p>\n\n\n\n<p><strong>Migration from Java EE to Jakarta EE<\/strong><\/p>\n\n\n\n<p>A major shift in this release is the movement from Java EE to Jakarta EE. This implies that where javax.* is used, will become jakarta.*<\/p>\n\n\n\n<p>A sample import header is shown in the code below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>For Java EE:\nimport javax.persistence.entity\nFor Jakarta EE:\nimport jakarta.persistence.entity\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Support for Micrometer Observation API<\/strong><\/h2>\n\n\n\n<p>Support for the new observation APIs introduced in <a href=\"https:\/\/github.com\/micrometer-metrics\/micrometer\/wiki\/Migrating-to-new-1.10.0-Observation-API\">Micrometer 1.10<\/a> was not left out in this major version. Auto configuration capability is now available for the ObservationRegistry interface. In Micrometer Observation API, <a href=\"https:\/\/zipkin.io\/\">Zipkin<\/a> and <a href=\"https:\/\/docs.wavefront.com\/java.html#java-sdks\">Wavefront<\/a> are now completely supported. While Zipkin configuration can be done in management.zipkin.tracing, Wavefront configuration file is found in management.wavefront. Importantly, tracing is handled by management.tracing. Observation API provides a way for Observability (a feature that observes internal states) to observe and understand internal activities of systems in execution from an outside point.<\/p>\n\n\n\n<p>The quest for solutions that can serve our modern-day development is on, and Spring Boot 3.0 has provided support to achieve flexibility, improve security, and support for libraries. In this article, we explored the new Spring Boot 3.0 and provided insight into some of the new features. As always, we developed a simple <a href=\"https:\/\/github.com\/valerio-nu\/helloworld_with_spring_3.0\">Hello world application<\/a> using Spring Boot 3.0. Tutorial code can be found on our <a href=\"https:\/\/github.com\/valerio-nu\">GitHub page<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction As technologies evolve, development should also evolve to keep pace and ensure security is maintained. Spring Boot 3.0 was launched recently and we decided [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[25,24],"class_list":["post-245","post","type-post","status-publish","format-standard","hentry","category-java","tag-jakarta-ee","tag-spring-boot-3-0"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>We tried the new Spring Boot 3.0 and this is what we learned - Andy&#039;s blog \u2935\ufe0f<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"We tried the new Spring Boot 3.0 and this is what we learned - Andy&#039;s blog \u2935\ufe0f\" \/>\n<meta property=\"og:description\" content=\"Introduction As technologies evolve, development should also evolve to keep pace and ensure security is maintained. Spring Boot 3.0 was launched recently and we decided [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/\" \/>\n<meta property=\"og:site_name\" content=\"Andy&#039;s blog \u2935\ufe0f\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-04T18:25:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/valerio.nu\/wp-content\/uploads\/2022\/11\/dev_dashboard-1024x819.jpg\" \/>\n<meta name=\"author\" content=\"andy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"andy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/valerio.nu\\\/index.php\\\/2022\\\/12\\\/04\\\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/valerio.nu\\\/index.php\\\/2022\\\/12\\\/04\\\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\\\/\"},\"author\":{\"name\":\"andy\",\"@id\":\"https:\\\/\\\/valerio.nu\\\/#\\\/schema\\\/person\\\/da69cc3da309893b0d3bc8fcef75f128\"},\"headline\":\"We tried the new Spring Boot 3.0 and this is what we learned\",\"datePublished\":\"2022-12-04T18:25:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/valerio.nu\\\/index.php\\\/2022\\\/12\\\/04\\\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\\\/\"},\"wordCount\":517,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/valerio.nu\\\/index.php\\\/2022\\\/12\\\/04\\\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/valerio.nu\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/dev_dashboard-1024x819.jpg\",\"keywords\":[\"Jakarta EE\",\"Spring Boot 3.0\"],\"articleSection\":[\"Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/valerio.nu\\\/index.php\\\/2022\\\/12\\\/04\\\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/valerio.nu\\\/index.php\\\/2022\\\/12\\\/04\\\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\\\/\",\"url\":\"https:\\\/\\\/valerio.nu\\\/index.php\\\/2022\\\/12\\\/04\\\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\\\/\",\"name\":\"We tried the new Spring Boot 3.0 and this is what we learned - Andy&#039;s blog \u2935\ufe0f\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/valerio.nu\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/valerio.nu\\\/index.php\\\/2022\\\/12\\\/04\\\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/valerio.nu\\\/index.php\\\/2022\\\/12\\\/04\\\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/valerio.nu\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/dev_dashboard-1024x819.jpg\",\"datePublished\":\"2022-12-04T18:25:27+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/valerio.nu\\\/#\\\/schema\\\/person\\\/da69cc3da309893b0d3bc8fcef75f128\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/valerio.nu\\\/index.php\\\/2022\\\/12\\\/04\\\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/valerio.nu\\\/index.php\\\/2022\\\/12\\\/04\\\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/valerio.nu\\\/index.php\\\/2022\\\/12\\\/04\\\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\\\/#primaryimage\",\"url\":\"https:\\\/\\\/valerio.nu\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/dev_dashboard-1024x819.jpg\",\"contentUrl\":\"https:\\\/\\\/valerio.nu\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/dev_dashboard-1024x819.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/valerio.nu\\\/index.php\\\/2022\\\/12\\\/04\\\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/valerio.nu\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"We tried the new Spring Boot 3.0 and this is what we learned\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/valerio.nu\\\/#website\",\"url\":\"https:\\\/\\\/valerio.nu\\\/\",\"name\":\"Andy&#039;s blog \u2935\ufe0f\",\"description\":\"Abandon all hope, ye who enter here\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/valerio.nu\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/valerio.nu\\\/#\\\/schema\\\/person\\\/da69cc3da309893b0d3bc8fcef75f128\",\"name\":\"andy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4852a025c6250c852814d4017f646677730a23c1ec14eb5ca36b69dcce5135a5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4852a025c6250c852814d4017f646677730a23c1ec14eb5ca36b69dcce5135a5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4852a025c6250c852814d4017f646677730a23c1ec14eb5ca36b69dcce5135a5?s=96&d=mm&r=g\",\"caption\":\"andy\"},\"sameAs\":[\"https:\\\/\\\/valerio.nu\"],\"url\":\"https:\\\/\\\/valerio.nu\\\/index.php\\\/author\\\/giuseppe\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"We tried the new Spring Boot 3.0 and this is what we learned - Andy&#039;s blog \u2935\ufe0f","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/","og_locale":"en_US","og_type":"article","og_title":"We tried the new Spring Boot 3.0 and this is what we learned - Andy&#039;s blog \u2935\ufe0f","og_description":"Introduction As technologies evolve, development should also evolve to keep pace and ensure security is maintained. Spring Boot 3.0 was launched recently and we decided [&hellip;]","og_url":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/","og_site_name":"Andy&#039;s blog \u2935\ufe0f","article_published_time":"2022-12-04T18:25:27+00:00","og_image":[{"url":"https:\/\/valerio.nu\/wp-content\/uploads\/2022\/11\/dev_dashboard-1024x819.jpg","type":"","width":"","height":""}],"author":"andy","twitter_card":"summary_large_image","twitter_misc":{"Written by":"andy","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/#article","isPartOf":{"@id":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/"},"author":{"name":"andy","@id":"https:\/\/valerio.nu\/#\/schema\/person\/da69cc3da309893b0d3bc8fcef75f128"},"headline":"We tried the new Spring Boot 3.0 and this is what we learned","datePublished":"2022-12-04T18:25:27+00:00","mainEntityOfPage":{"@id":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/"},"wordCount":517,"commentCount":0,"image":{"@id":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/#primaryimage"},"thumbnailUrl":"https:\/\/valerio.nu\/wp-content\/uploads\/2022\/11\/dev_dashboard-1024x819.jpg","keywords":["Jakarta EE","Spring Boot 3.0"],"articleSection":["Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/","url":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/","name":"We tried the new Spring Boot 3.0 and this is what we learned - Andy&#039;s blog \u2935\ufe0f","isPartOf":{"@id":"https:\/\/valerio.nu\/#website"},"primaryImageOfPage":{"@id":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/#primaryimage"},"image":{"@id":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/#primaryimage"},"thumbnailUrl":"https:\/\/valerio.nu\/wp-content\/uploads\/2022\/11\/dev_dashboard-1024x819.jpg","datePublished":"2022-12-04T18:25:27+00:00","author":{"@id":"https:\/\/valerio.nu\/#\/schema\/person\/da69cc3da309893b0d3bc8fcef75f128"},"breadcrumb":{"@id":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/#primaryimage","url":"https:\/\/valerio.nu\/wp-content\/uploads\/2022\/11\/dev_dashboard-1024x819.jpg","contentUrl":"https:\/\/valerio.nu\/wp-content\/uploads\/2022\/11\/dev_dashboard-1024x819.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/valerio.nu\/index.php\/2022\/12\/04\/we-tried-the-new-spring-boot-3-0-and-this-is-what-we-learned\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/valerio.nu\/"},{"@type":"ListItem","position":2,"name":"We tried the new Spring Boot 3.0 and this is what we learned"}]},{"@type":"WebSite","@id":"https:\/\/valerio.nu\/#website","url":"https:\/\/valerio.nu\/","name":"Andy&#039;s blog \u2935\ufe0f","description":"Abandon all hope, ye who enter here","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/valerio.nu\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/valerio.nu\/#\/schema\/person\/da69cc3da309893b0d3bc8fcef75f128","name":"andy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4852a025c6250c852814d4017f646677730a23c1ec14eb5ca36b69dcce5135a5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4852a025c6250c852814d4017f646677730a23c1ec14eb5ca36b69dcce5135a5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4852a025c6250c852814d4017f646677730a23c1ec14eb5ca36b69dcce5135a5?s=96&d=mm&r=g","caption":"andy"},"sameAs":["https:\/\/valerio.nu"],"url":"https:\/\/valerio.nu\/index.php\/author\/giuseppe\/"}]}},"_links":{"self":[{"href":"https:\/\/valerio.nu\/index.php\/wp-json\/wp\/v2\/posts\/245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/valerio.nu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/valerio.nu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/valerio.nu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/valerio.nu\/index.php\/wp-json\/wp\/v2\/comments?post=245"}],"version-history":[{"count":9,"href":"https:\/\/valerio.nu\/index.php\/wp-json\/wp\/v2\/posts\/245\/revisions"}],"predecessor-version":[{"id":257,"href":"https:\/\/valerio.nu\/index.php\/wp-json\/wp\/v2\/posts\/245\/revisions\/257"}],"wp:attachment":[{"href":"https:\/\/valerio.nu\/index.php\/wp-json\/wp\/v2\/media?parent=245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/valerio.nu\/index.php\/wp-json\/wp\/v2\/categories?post=245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/valerio.nu\/index.php\/wp-json\/wp\/v2\/tags?post=245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}