<!--DEBUG:--><!--DEBUG:dc3-united-states-software-in-english-pdf-2--><!--DEBUG:--><!--DEBUG:dc3-united-states-software-in-english-pdf-2--><!--DEBUG-spv-->{"id":2027106,"date":"2021-11-05T22:34:00","date_gmt":"2021-11-05T20:34:00","guid":{"rendered":"http:\/\/nhub.news\/?p=2027106"},"modified":"2021-11-06T00:04:08","modified_gmt":"2021-11-05T22:04:08","slug":"see-spring-native-in-action-with-the-okta-spring-boot-starter","status":"publish","type":"post","link":"http:\/\/nhub.news\/ru\/2021\/11\/see-spring-native-in-action-with-the-okta-spring-boot-starter\/","title":{"rendered":"See Spring Native in Action With the Okta Spring Boot Starter"},"content":{"rendered":"<p style=\"text-align: justify;\"><b>Learn how to add a couple of lines to add native support to a Spring Boot application that uses Okta.<\/b><br \/>\nJoin the DZone community and get the full member experience. The Spring team announced a new experimental Spring Native project in the fall of 2020, which gave Spring developers hope for faster startup times. Converting your Spring apps to native executables is what Spring Native is all about, and it does this by using GraalVM. This was a huge announcement because the new kids on the block, Micronaut, and Quarkus, created native executables by default. When I first heard about Spring Native, I was quite excited. Despite its initial release (v0.8.3) on November 23,2020, I began using it in September 2020, likely due to SpringOne. How do I know for sure? Because that&#8217;s when I tried it for the first time and reported an error for the Okta Spring Boot starter. In the waning weeks of 2020, I was able to get things functioning with Spring Security&#8217;s OAuth dependencies (rather than the Okta starter). According to VMWare Tanzu\u2019s recent State of Spring 2021 report, a lot of people know about Spring Native, but it\u2019s still early. I wrote about how to build native Java apps with Micronaut, Quarkus, and Spring Boot earlier this summer and included my learnings. Around the same time, I thought to myself, &#171;it\u2019d sure be nice if the Okta Spring Boot starter worked with Spring Native.&#187; To solve this desire, I scheduled a Twitch stream with Brian Demers and Josh Long. We spent 90+ minutes figuring things out. You can watch our struggles, collaborations, and ultimate joy in the video below. I added a detailed table of contents to the video\u2019s description on YouTube, so you can skip around if you like. This stream originally aired on June 22, 2021. Since then, there have been a few Spring Boot releases and several Spring Native releases. And don\u2019t forget, there was another SpringOne! Today, I\u2019m happy to announce that we\u2019ve added our learnings to Okta Spring Boot v2.1.1; now, it only takes a couple of lines to add native support to a Spring Boot application that uses Okta. Or, if you\u2019d prefer a full example: If you\u2019d like to see what it takes to migrate my previously mentioned native Java + Spring Boot example from using Spring Security OAuth to the Okta starter, look no further than @oktadev\/native-java-examples#5. You can also try it out yourself with the Okta CLI. Install it and follow along below for a quick Okta + Spring Native example. To create a secure Spring Boot app with Okta, run okta start spring-boot. You\u2019ll need to verify your email and set a password as part of this. If you already have an Okta account, you can run okta login first. This command will download our Okta Spring Boot sample, register your app on Okta, and configure it by adding your Okta settings to src\/main\/resources\/application.properties. Add @NativeHint(options = &#171;&#8212;enable-https&#187;) to the main Application class as specified above. Next, edit your pom.xml and add the Spring Native version and classifier to the section: Then, replace the section with the XML below: Giddyup! Next, open your browser to http:\/\/localhost:8080. You\u2019ll likely be logged in straight away and see your name printed on the screen. We hope you learned something from this video and our experience. A huge thanks to Josh Long and Andy Clement for their assistance during this stream. The Spring Native docs are where you want to go to really dig in. If you prefer videos, I recommend watching Josh Long\u2019s Spring Tips: Spring Native 0.10.0 video. Published at DZone with permission of Matt Raible, DZone MVB. See the original article here. Opinions expressed by DZone contributors are their own.<\/p>\n<script>jQuery(function(){jQuery(\".vc_icon_element-icon\").css(\"top\", \"0px\");});<\/script><script>jQuery(function(){jQuery(\"#td_post_ranks\").css(\"height\", \"10px\");});<\/script><script>jQuery(function(){jQuery(\".td-post-content\").find(\"p\").find(\"img\").hide();});<\/script>","protected":false},"excerpt":{"rendered":"<p>Learn how to add a couple of lines to add native support to a Spring Boot application that uses Okta. Join the DZone community and get the full member experience. The Spring team announced a new experimental Spring Native project in the fall of 2020, which gave Spring developers hope for faster startup times. Converting [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2027105,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[93],"tags":[],"_links":{"self":[{"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/posts\/2027106"}],"collection":[{"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/comments?post=2027106"}],"version-history":[{"count":1,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/posts\/2027106\/revisions"}],"predecessor-version":[{"id":2027107,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/posts\/2027106\/revisions\/2027107"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/media\/2027105"}],"wp:attachment":[{"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/media?parent=2027106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/categories?post=2027106"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/tags?post=2027106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}