{"id":2333,"date":"2022-02-22T15:18:13","date_gmt":"2022-02-22T14:18:13","guid":{"rendered":"https:\/\/ekiwi.de\/?p=2333"},"modified":"2022-02-22T15:18:13","modified_gmt":"2022-02-22T14:18:13","slug":"spring-boot-statische-html-inhalte-ausliefern","status":"publish","type":"post","link":"https:\/\/ekiwi.de\/index.php\/2333\/spring-boot-statische-html-inhalte-ausliefern\/","title":{"rendered":"Spring Boot: Statische HTML-Inhalte ausliefern"},"content":{"rendered":"<p>Zus\u00e4tzliche statische Inhalte in Spring Boot Anwendung mit ausliefern.<\/p>\n<p><!--more--><\/p>\n<p>In Spring-Boot lassen sich statische Inhalte mit ausliefern, schick im JAR integriert im Webserver. Die Inhalte hierf\u00fcr werden in einem speziellen Ordner abgelegt: &#8222;src\/main\/java\/resources\/static&#8220;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/spring_boot_static.png\" alt=\"\" width=\"662\" height=\"353\" class=\"alignnone size-full wp-image-2334\" srcset=\"\/wp-content\/uploads\/2022\/02\/spring_boot_static.png 662w, \/wp-content\/uploads\/2022\/02\/spring_boot_static-300x160.png 300w\" sizes=\"auto, (max-width: 662px) 100vw, 662px\" \/><\/p>\n<p>Startet der Server, bzw. erzeugen wir ein JAR und starten dann den Server k\u00f6nnen die Inhalte im Browser aufgerufen werden.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/spring_boot_static_1.png\" alt=\"\" width=\"884\" height=\"269\" class=\"alignnone size-full wp-image-2335\" srcset=\"\/wp-content\/uploads\/2022\/02\/spring_boot_static_1.png 884w, \/wp-content\/uploads\/2022\/02\/spring_boot_static_1-300x91.png 300w, \/wp-content\/uploads\/2022\/02\/spring_boot_static_1-768x234.png 768w\" sizes=\"auto, (max-width: 884px) 100vw, 884px\" \/><\/p>","protected":false},"excerpt":{"rendered":"<p>Zus\u00e4tzliche statische Inhalte in Spring Boot Anwendung mit ausliefern.<\/p>\n","protected":false},"author":1,"featured_media":2128,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[13],"tags":[119,577],"class_list":["post-2333","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programmierung","tag-java","tag-spring"],"_links":{"self":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/posts\/2333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/comments?post=2333"}],"version-history":[{"count":0,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/posts\/2333\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/media\/2128"}],"wp:attachment":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/media?parent=2333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/categories?post=2333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/tags?post=2333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}