{"id":1302,"date":"2020-02-14T15:34:13","date_gmt":"2020-02-14T14:34:13","guid":{"rendered":"https:\/\/elstarit.nl\/?p=1302"},"modified":"2020-02-14T15:34:18","modified_gmt":"2020-02-14T14:34:18","slug":"spring-cloud-function-on-azure-run-locally","status":"publish","type":"post","link":"https:\/\/elstarit.nl\/?p=1302","title":{"rendered":"Spring Cloud Function on Azure run locally"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I am busy with a demo application to show the power of Cloud Functions in general and specific Spring Cloud Function.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I was already able to <a rel=\"noreferrer noopener\" aria-label=\"deploy the Demo application on IBM Cloud (opens in a new tab)\" href=\"https:\/\/elstarit.nl\/?p=1297\" target=\"_blank\">deploy the Demo application on IBM Cloud<\/a>, next step is to run in it on Azure.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prepare the application<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I found a very <a rel=\"noreferrer noopener\" aria-label=\"good article (opens in a new tab)\" href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/java\/spring-framework\/getting-started-with-spring-cloud-function-in-azure\" target=\"_blank\">good article<\/a> by Microsoft which explain how to prepare your Spring Cloud Function application before it can be deployed to Azure.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">First run it locally<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After the preparations I tried to run the application locally. Microsoft did a great job to make this possible. Helps speed up the development of the application before the actual deployment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But when I tried to run the application locally it failed with a stack trace. After some searching on the internet I found the <a rel=\"noreferrer noopener\" aria-label=\"solution (opens in a new tab)\" href=\"https:\/\/github.com\/Azure\/azure-functions-java-worker\/issues\/338\" target=\"_blank\">solution<\/a>. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I need to the Main Class to the local.settings.json file, which point to the start class of the application. After I added this line I was able to run my demo application locally.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{<br>  \"IsEncrypted\": false,<br>  \"Values\": {<br>    \"AzureWebJobsStorage\": \"\",<br>    \"FUNCTIONS_WORKER_RUNTIME\": \"java\",<br>    \"AzureWebJobsDashboard\": \"\",<br>    \"MAIN_CLASS\":\"nl.elstarit.nl.demo.functions.demo.DemoFunction\"<br>  }<br>}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The last step, the actual deployment to Azure was very easy. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am busy with a demo application to show the power of Cloud Functions in general and specific Spring Cloud Function. I was already able to deploy the Demo application on IBM Cloud, next step is to run in it on Azure. Prepare the application I found a very good article by Microsoft which explain <a class=\"read-more\" href=\"https:\/\/elstarit.nl\/?p=1302\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[2],"tags":[123,66,51,5],"class_list":["post-1302","post","type-post","status-publish","format-standard","hentry","category-development","tag-azure","tag-development","tag-ibmchampion","tag-spring"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Cloud Function on Azure run locally - elstar IT<\/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:\/\/elstarit.nl\/?p=1302\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Cloud Function on Azure run locally - elstar IT\" \/>\n<meta property=\"og:description\" content=\"I am busy with a demo application to show the power of Cloud Functions in general and specific Spring Cloud Function. I was already able to deploy the Demo application on IBM Cloud, next step is to run in it on Azure. Prepare the application I found a very good article by Microsoft which explain Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/elstarit.nl\/?p=1302\" \/>\n<meta property=\"og:site_name\" content=\"elstar IT\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-14T14:34:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-14T14:34:18+00:00\" \/>\n<meta name=\"author\" content=\"flinden68\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"flinden68\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=1302#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=1302\"},\"author\":{\"name\":\"flinden68\",\"@id\":\"https:\\\/\\\/elstarit.nl\\\/#\\\/schema\\\/person\\\/426456e816ad57bf411d5d2bb9768935\"},\"headline\":\"Spring Cloud Function on Azure run locally\",\"datePublished\":\"2020-02-14T14:34:13+00:00\",\"dateModified\":\"2020-02-14T14:34:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=1302\"},\"wordCount\":183,\"commentCount\":0,\"keywords\":[\"azure\",\"development\",\"ibmchampion\",\"spring\"],\"articleSection\":[\"development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/elstarit.nl\\\/?p=1302#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=1302\",\"url\":\"https:\\\/\\\/elstarit.nl\\\/?p=1302\",\"name\":\"Spring Cloud Function on Azure run locally - elstar IT\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/elstarit.nl\\\/#website\"},\"datePublished\":\"2020-02-14T14:34:13+00:00\",\"dateModified\":\"2020-02-14T14:34:18+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/elstarit.nl\\\/#\\\/schema\\\/person\\\/426456e816ad57bf411d5d2bb9768935\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=1302#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/elstarit.nl\\\/?p=1302\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=1302#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/elstarit.nl\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"development\",\"item\":\"https:\\\/\\\/elstarit.nl\\\/?cat=2\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Spring Cloud Function on Azure run locally\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/elstarit.nl\\\/#website\",\"url\":\"https:\\\/\\\/elstarit.nl\\\/\",\"name\":\"elstar IT\",\"description\":\"Fullstack | Java | Tech Speaker | Tech Coach | Frank van der Linden\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/elstarit.nl\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/elstarit.nl\\\/#\\\/schema\\\/person\\\/426456e816ad57bf411d5d2bb9768935\",\"name\":\"flinden68\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b915e82bbf3665adb6f7cef5acc5292b5958aec259f763ccde322ec72c643ec0?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b915e82bbf3665adb6f7cef5acc5292b5958aec259f763ccde322ec72c643ec0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b915e82bbf3665adb6f7cef5acc5292b5958aec259f763ccde322ec72c643ec0?s=96&d=mm&r=g\",\"caption\":\"flinden68\"},\"sameAs\":[\"http:\\\/\\\/www.elstarit.nl\",\"https:\\\/\\\/x.com\\\/elstarit\"],\"url\":\"https:\\\/\\\/elstarit.nl\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Cloud Function on Azure run locally - elstar IT","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:\/\/elstarit.nl\/?p=1302","og_locale":"en_US","og_type":"article","og_title":"Spring Cloud Function on Azure run locally - elstar IT","og_description":"I am busy with a demo application to show the power of Cloud Functions in general and specific Spring Cloud Function. I was already able to deploy the Demo application on IBM Cloud, next step is to run in it on Azure. Prepare the application I found a very good article by Microsoft which explain Read More","og_url":"https:\/\/elstarit.nl\/?p=1302","og_site_name":"elstar IT","article_published_time":"2020-02-14T14:34:13+00:00","article_modified_time":"2020-02-14T14:34:18+00:00","author":"flinden68","twitter_misc":{"Written by":"flinden68","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/elstarit.nl\/?p=1302#article","isPartOf":{"@id":"https:\/\/elstarit.nl\/?p=1302"},"author":{"name":"flinden68","@id":"https:\/\/elstarit.nl\/#\/schema\/person\/426456e816ad57bf411d5d2bb9768935"},"headline":"Spring Cloud Function on Azure run locally","datePublished":"2020-02-14T14:34:13+00:00","dateModified":"2020-02-14T14:34:18+00:00","mainEntityOfPage":{"@id":"https:\/\/elstarit.nl\/?p=1302"},"wordCount":183,"commentCount":0,"keywords":["azure","development","ibmchampion","spring"],"articleSection":["development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/elstarit.nl\/?p=1302#respond"]}]},{"@type":"WebPage","@id":"https:\/\/elstarit.nl\/?p=1302","url":"https:\/\/elstarit.nl\/?p=1302","name":"Spring Cloud Function on Azure run locally - elstar IT","isPartOf":{"@id":"https:\/\/elstarit.nl\/#website"},"datePublished":"2020-02-14T14:34:13+00:00","dateModified":"2020-02-14T14:34:18+00:00","author":{"@id":"https:\/\/elstarit.nl\/#\/schema\/person\/426456e816ad57bf411d5d2bb9768935"},"breadcrumb":{"@id":"https:\/\/elstarit.nl\/?p=1302#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/elstarit.nl\/?p=1302"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/elstarit.nl\/?p=1302#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/elstarit.nl\/"},{"@type":"ListItem","position":2,"name":"development","item":"https:\/\/elstarit.nl\/?cat=2"},{"@type":"ListItem","position":3,"name":"Spring Cloud Function on Azure run locally"}]},{"@type":"WebSite","@id":"https:\/\/elstarit.nl\/#website","url":"https:\/\/elstarit.nl\/","name":"elstar IT","description":"Fullstack | Java | Tech Speaker | Tech Coach | Frank van der Linden","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/elstarit.nl\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/elstarit.nl\/#\/schema\/person\/426456e816ad57bf411d5d2bb9768935","name":"flinden68","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b915e82bbf3665adb6f7cef5acc5292b5958aec259f763ccde322ec72c643ec0?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b915e82bbf3665adb6f7cef5acc5292b5958aec259f763ccde322ec72c643ec0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b915e82bbf3665adb6f7cef5acc5292b5958aec259f763ccde322ec72c643ec0?s=96&d=mm&r=g","caption":"flinden68"},"sameAs":["http:\/\/www.elstarit.nl","https:\/\/x.com\/elstarit"],"url":"https:\/\/elstarit.nl\/?author=1"}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/elstarit.nl\/index.php?rest_route=\/wp\/v2\/posts\/1302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elstarit.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elstarit.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elstarit.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elstarit.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1302"}],"version-history":[{"count":2,"href":"https:\/\/elstarit.nl\/index.php?rest_route=\/wp\/v2\/posts\/1302\/revisions"}],"predecessor-version":[{"id":1304,"href":"https:\/\/elstarit.nl\/index.php?rest_route=\/wp\/v2\/posts\/1302\/revisions\/1304"}],"wp:attachment":[{"href":"https:\/\/elstarit.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elstarit.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elstarit.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}