{"id":90361,"date":"2019-04-04T19:00:25","date_gmt":"2019-04-04T16:00:25","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=90361"},"modified":"2019-04-03T11:28:55","modified_gmt":"2019-04-03T08:28:55","slug":"skip-cache-thyemeleaf-bypass-restarting-server","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html","title":{"rendered":"Spring Boot &#8211; How to skip cache thyemeleaf template, js, css etc to bypass restarting the server everytime"},"content":{"rendered":"<p>The default template resolver registered by Spring Boot autoconfiguration for ThyemeLeaf is classpath based, meaning that it loads the templates and other static resources from the compiled resources i.e, \/target\/classes\/**.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"385\" height=\"449\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/04\/\u03b1\u03c1\u03c7\u03b5\u03af\u03bf-\u03bb\u03ae\u03c8\u03b7\u03c2.png\" alt=\"cache thyemeleaf template\" class=\"wp-image-90375\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/04\/\u03b1\u03c1\u03c7\u03b5\u03af\u03bf-\u03bb\u03ae\u03c8\u03b7\u03c2.png 385w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/04\/\u03b1\u03c1\u03c7\u03b5\u03af\u03bf-\u03bb\u03ae\u03c8\u03b7\u03c2-257x300.png 257w\" sizes=\"(max-width: 385px) 100vw, 385px\" \/><\/figure>\n<\/div>\n<p><b>To load the changes to the resources (HTML, js, CSS, etc), we can<\/b><\/p>\n<ul class=\"wp-block-list\">\n<li>Restart the application every time- which is of course not a good idea!<\/li>\n<li>Recompile the resources using CTRL+F9 on IntelliJ or (CTRL+SHIFT+F9 if you are using eclipse keymap) or simply Right Click and Click Compile<\/li>\n<li><i>Or a better solution as described below !!<\/i><\/li>\n<\/ul>\n<p>Thymeleaf includes a file-system based resolver, this loads the templates from the file-system directly not through the classpath (compiled resources).<\/p>\n<p>See the snippet from DefaultTemplateResolverConfiguration#defaultTemplateResolver<\/p>\n<div>\n<div id=\"highlighter_98186\" class=\"syntaxhighlighter  java\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"java color1\">@Bean<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"java keyword\">public<\/code> <code class=\"java plain\">SpringResourceTemplateResolver defaultTemplateResolver() {<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"java spaces\">&nbsp;<\/code><code class=\"java plain\">SpringResourceTemplateResolver resolver = <\/code><code class=\"java keyword\">new<\/code> <code class=\"java plain\">SpringResourceTemplateResolver();<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"java spaces\">&nbsp;<\/code><code class=\"java plain\">resolver.setApplicationContext(<\/code><code class=\"java keyword\">this<\/code><code class=\"java plain\">.applicationContext);<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"java spaces\">&nbsp;<\/code><code class=\"java plain\">resolver.setPrefix(<\/code><code class=\"java keyword\">this<\/code><code class=\"java plain\">.properties.getPrefix());<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Where the property prefix is defaulted to &#8220;classpath:\/template\/&#8221;. See the snippet ThymeleafProperties#DEFAULT_PREFIX<\/p>\n<div>\n<div id=\"highlighter_855217\" class=\"syntaxhighlighter  java\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"java keyword\">public<\/code> <code class=\"java keyword\">static<\/code> <code class=\"java keyword\">final<\/code> <code class=\"java plain\">String DEFAULT_PREFIX = <\/code><code class=\"java string\">\"classpath:\/templates\/\"<\/code><code class=\"java plain\">;<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h2 class=\"wp-block-heading\">The Solution:<\/h2>\n<p>Spring Boot allows us to <b>override the property &#8216;spring.thymeleaf.prefix&#8217;<\/b> to point to source folder &#8216;src\/main\/resources\/templates\/ instead of the default &#8220;classpath:\/templates\/&#8221; as folllows.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>In application.yml|properties file:<\/p>\n<div>\n<div id=\"highlighter_478195\" class=\"syntaxhighlighter  java\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"java plain\">spring:<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">thymeleaf:<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">prefix: file:src\/main\/resources\/templates\/&nbsp; #directly serve from src folder instead of target<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>This would tell the runtime to not look into the target\/ folder. And you don&#8217;t need to restart server everytime you update a html template on our src\/main\/resources\/template<\/p>\n<h2 class=\"wp-block-heading\">What about the JavaScript\/CSS files?<\/h2>\n<p>You can further go ahead and update the &#8216;spring.resources.static-locations&#8217; to point to your static resource folder (where you keep js\/css, images etc)<\/p>\n<pre class=\"brush:java\">\nspring:\n    resources:\n        static-locations: file:src\/main\/resources\/static\/ #directly serve from src folder instead of target        cache:\n          period: 0<\/pre>\n<h2 class=\"wp-block-heading\">The full code:<\/h2>\n<p>It a good practice to have the above configuration during development only. To have the default configuration for production system, you can use Profiles and define separate behaviour for each environment.<\/p>\n<p>Here&#8217;s the full code snippets based on what we just described!<\/p>\n<h2 class=\"wp-block-heading\">Project Structure:<\/h2>\n<p><b>Pom.xml:<\/b><\/p>\n<pre class=\"brush:xml\">\n&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n         xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\"&gt;\n    &lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;\n\n    &lt;artifactId&gt;my-sample-app&lt;\/artifactId&gt;\n    &lt;packaging&gt;jar&lt;\/packaging&gt;\n\n    &lt;parent&gt;\n        &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n        &lt;artifactId&gt;spring-boot-starter-parent&lt;\/artifactId&gt;\n        &lt;version&gt;2.1.3.RELEASE&lt;\/version&gt;\n        &lt;relativePath\/&gt; &lt;!-- lookup parent from repository --&gt;\n    &lt;\/parent&gt;\n\n    &lt;properties&gt;\n        &lt;java.version&gt;11&lt;\/java.version&gt;\n    &lt;\/properties&gt;\n\n    &lt;dependencies&gt;\n        &lt;!-- the basic dependencies as described on the blog --&gt;\n        &lt;dependency&gt;\n            &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n            &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;\n        &lt;\/dependency&gt;\n        &lt;dependency&gt;\n            &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n            &lt;artifactId&gt;spring-boot-starter-thymeleaf&lt;\/artifactId&gt;\n        &lt;\/dependency&gt;\n    &lt;\/dependencies&gt;\n\n    &lt;build&gt;\n        &lt;finalName&gt;${build.profile}-${project.version}-app&lt;\/finalName&gt;\n        &lt;plugins&gt;\n            &lt;plugin&gt;\n                &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n                &lt;artifactId&gt;spring-boot-maven-plugin&lt;\/artifactId&gt;\n            &lt;\/plugin&gt;\n        &lt;\/plugins&gt;\n    &lt;\/build&gt;\n\n    &lt;profiles&gt;\n\n        &lt;!-- Two profiles --&gt;\n\n        &lt;profile&gt;\n            &lt;id&gt;dev&lt;\/id&gt;\n            &lt;activation&gt;\n                &lt;activeByDefault&gt;true&lt;\/activeByDefault&gt;\n            &lt;\/activation&gt;\n            &lt;properties&gt;\n                &lt;spring.profiles.active&gt;dev&lt;\/spring.profiles.active&gt;\n                &lt;build.profile&gt;dev&lt;build.profile&gt;\n            &lt;\/properties&gt;\n        &lt;\/profile&gt;\n\n        &lt;profile&gt;\n            &lt;id&gt;prod&lt;\/id&gt;\n            &lt;properties&gt;\n                &lt;spring.profiles.active&gt;prod&lt;\/spring.profiles.active&gt;\n                &lt;build.profile&gt;prod&lt;build.profile&gt;\n            &lt;\/properties&gt;\n        &lt;\/profile&gt;\n\n    &lt;\/profiles&gt;\n\n&lt;\/project&gt;<\/pre>\n<p><b>The property files (yml)<\/b><\/p>\n<p><b>application-dev.yml<\/b><\/p>\n<div>\n<div id=\"highlighter_494931\" class=\"syntaxhighlighter  java\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"java plain\">spring:<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">profiles:<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">active: dev<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">thymeleaf:<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">cache: <\/code><code class=\"java keyword\">false<\/code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <code class=\"java plain\">prefix: file:src\/main\/resources\/templates\/&nbsp; #directly serve from src folder instead of target&nbsp;&nbsp;&nbsp; resources:<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java keyword\">static<\/code><code class=\"java plain\">-locations: file:src\/main\/resources\/<\/code><code class=\"java keyword\">static<\/code><code class=\"java plain\">\/ #directly serve from src folder instead of target&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cache:<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">period: <\/code><code class=\"java value\">0<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><b>&nbsp;<\/b><\/p>\n<p><b>application-prod.yml (doesn&#8217;t override anything)<\/b><\/p>\n<div>\n<div id=\"highlighter_857689\" class=\"syntaxhighlighter  java\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"java plain\">spring:<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">profiles:<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">active: prod<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Hope this helps!<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>Published on Java Code Geeks with permission by Ganesh Tiwari, partner at our <a href=\"\/\/www.javacodegeeks.com\/join-us\/jcg\/\" target=\"_blank\" rel=\"noopener noreferrer\">JCG program<\/a>. See the original article here: <a href=\"http:\/\/ganeshtiwaridotcomdotnp.blogspot.com\/2019\/04\/spring-boot-how-to-skip-cache.html\" target=\"_blank\" rel=\"noopener noreferrer\">Spring Boot &#8211; How to skip cache thyemeleaf template, js, css etc to bypass restarting the server everytime<\/a><\/p>\n<p>Opinions expressed by Java Code Geeks contributors are their own.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The default template resolver registered by Spring Boot autoconfiguration for ThyemeLeaf is classpath based, meaning that it loads the templates and other static resources from the compiled resources i.e, \/target\/classes\/**. To load the changes to the resources (HTML, js, CSS, etc), we can Restart the application every time- which is of course not a good &hellip;<\/p>\n","protected":false},"author":121,"featured_media":240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[854,1886],"class_list":["post-90361","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-spring-boot","tag-thyemeleaf"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Boot - How to skip cache thyemeleaf template, js, css etc to bypass restarting the server everytime - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn about cache thyemeleaf template? Check our article explaining how to skip cache thyemeleaf to bypass restarting the server everytime.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Boot - How to skip cache thyemeleaf template, js, css etc to bypass restarting the server everytime - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about cache thyemeleaf template? Check our article explaining how to skip cache thyemeleaf to bypass restarting the server everytime.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-04T16:00:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ganesh Tiwari\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ganesh Tiwari\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/04\\\/skip-cache-thyemeleaf-bypass-restarting-server.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/04\\\/skip-cache-thyemeleaf-bypass-restarting-server.html\"},\"author\":{\"name\":\"Ganesh Tiwari\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/42d2644feaea6c153af2f63a38742430\"},\"headline\":\"Spring Boot &#8211; How to skip cache thyemeleaf template, js, css etc to bypass restarting the server everytime\",\"datePublished\":\"2019-04-04T16:00:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/04\\\/skip-cache-thyemeleaf-bypass-restarting-server.html\"},\"wordCount\":368,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/04\\\/skip-cache-thyemeleaf-bypass-restarting-server.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"keywords\":[\"Spring Boot\",\"thyemeleaf\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/04\\\/skip-cache-thyemeleaf-bypass-restarting-server.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/04\\\/skip-cache-thyemeleaf-bypass-restarting-server.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/04\\\/skip-cache-thyemeleaf-bypass-restarting-server.html\",\"name\":\"Spring Boot - How to skip cache thyemeleaf template, js, css etc to bypass restarting the server everytime - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/04\\\/skip-cache-thyemeleaf-bypass-restarting-server.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/04\\\/skip-cache-thyemeleaf-bypass-restarting-server.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"datePublished\":\"2019-04-04T16:00:25+00:00\",\"description\":\"Interested to learn about cache thyemeleaf template? Check our article explaining how to skip cache thyemeleaf to bypass restarting the server everytime.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/04\\\/skip-cache-thyemeleaf-bypass-restarting-server.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/04\\\/skip-cache-thyemeleaf-bypass-restarting-server.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/04\\\/skip-cache-thyemeleaf-bypass-restarting-server.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"spring-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/04\\\/skip-cache-thyemeleaf-bypass-restarting-server.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Spring Boot &#8211; How to skip cache thyemeleaf template, js, css etc to bypass restarting the server everytime\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/42d2644feaea6c153af2f63a38742430\",\"name\":\"Ganesh Tiwari\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7aaed2dd8ba263b2810c1d2ece9d3577aeaa969c8ca5c1e065aeb4df48159706?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7aaed2dd8ba263b2810c1d2ece9d3577aeaa969c8ca5c1e065aeb4df48159706?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7aaed2dd8ba263b2810c1d2ece9d3577aeaa969c8ca5c1e065aeb4df48159706?s=96&d=mm&r=g\",\"caption\":\"Ganesh Tiwari\"},\"sameAs\":[\"http:\\\/\\\/ganeshtiwaridotcomdotnp.blogspot.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Ganesh-Tiwari\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Boot - How to skip cache thyemeleaf template, js, css etc to bypass restarting the server everytime - Java Code Geeks","description":"Interested to learn about cache thyemeleaf template? Check our article explaining how to skip cache thyemeleaf to bypass restarting the server everytime.","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:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html","og_locale":"en_US","og_type":"article","og_title":"Spring Boot - How to skip cache thyemeleaf template, js, css etc to bypass restarting the server everytime - Java Code Geeks","og_description":"Interested to learn about cache thyemeleaf template? Check our article explaining how to skip cache thyemeleaf to bypass restarting the server everytime.","og_url":"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2019-04-04T16:00:25+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","type":"image\/jpeg"}],"author":"Ganesh Tiwari","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Ganesh Tiwari","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html"},"author":{"name":"Ganesh Tiwari","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/42d2644feaea6c153af2f63a38742430"},"headline":"Spring Boot &#8211; How to skip cache thyemeleaf template, js, css etc to bypass restarting the server everytime","datePublished":"2019-04-04T16:00:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html"},"wordCount":368,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","keywords":["Spring Boot","thyemeleaf"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html","url":"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html","name":"Spring Boot - How to skip cache thyemeleaf template, js, css etc to bypass restarting the server everytime - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","datePublished":"2019-04-04T16:00:25+00:00","description":"Interested to learn about cache thyemeleaf template? Check our article explaining how to skip cache thyemeleaf to bypass restarting the server everytime.","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","width":150,"height":150,"caption":"spring-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2019\/04\/skip-cache-thyemeleaf-bypass-restarting-server.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Spring Boot &#8211; How to skip cache thyemeleaf template, js, css etc to bypass restarting the server everytime"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/42d2644feaea6c153af2f63a38742430","name":"Ganesh Tiwari","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/7aaed2dd8ba263b2810c1d2ece9d3577aeaa969c8ca5c1e065aeb4df48159706?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7aaed2dd8ba263b2810c1d2ece9d3577aeaa969c8ca5c1e065aeb4df48159706?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7aaed2dd8ba263b2810c1d2ece9d3577aeaa969c8ca5c1e065aeb4df48159706?s=96&d=mm&r=g","caption":"Ganesh Tiwari"},"sameAs":["http:\/\/ganeshtiwaridotcomdotnp.blogspot.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Ganesh-Tiwari"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/90361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/121"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=90361"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/90361\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=90361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=90361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=90361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}