{"id":153,"date":"2007-08-31T08:46:48","date_gmt":"2007-08-31T06:46:48","guid":{"rendered":"http:\/\/www.wuenschenswert.net\/wunschdenken\/archives\/153"},"modified":"2007-08-31T08:46:48","modified_gmt":"2007-08-31T06:46:48","slug":"reloadablepropertiesfactorybean-beware-of-caching","status":"publish","type":"post","link":"http:\/\/www.wuenschenswert.net\/wunschdenken\/archives\/153","title":{"rendered":"ReloadablePropertiesFactoryBean: Beware of Caching"},"content":{"rendered":"<p>As <a href=\"http:\/\/www.wuenschenswert.net\/wunschdenken\/archives\/107#comment-4133\">Glenn pointed out<\/a>, reloading properties is futile if the servlet engine returns an unchanged copy of the property file from its resource cache.<\/p>\n<p>We need to find the real file anyway to check its last modification date, so overriding &#8220;loadProperties&#8221; to read from the file system absolutely makes sense. <\/p>\n<p>Here&#8217;s an updated version, which correctly handles reloading of properties also from a <a href=\"http:\/\/www.springframework.org\/docs\/api\/org\/springframework\/web\/context\/support\/ServletContextResource.html\">ServletContextResource<\/a>.<\/p>\n<p><a href=\"http:\/\/www.wuenschenswert.net\/files\/spring-reloaded-2007-08-29.zip\">Download<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As Glenn pointed out, reloading properties is futile if the servlet engine returns an unchanged copy of the property file from its resource cache. We need to find the real file anyway to check its last modification date, so overriding &#8220;loadProperties&#8221; to read from the file system absolutely makes sense. Here&#8217;s an updated version, which &hellip; <a href=\"http:\/\/www.wuenschenswert.net\/wunschdenken\/archives\/153\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;ReloadablePropertiesFactoryBean: Beware of Caching&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"http:\/\/www.wuenschenswert.net\/wunschdenken\/wp-json\/wp\/v2\/posts\/153"}],"collection":[{"href":"http:\/\/www.wuenschenswert.net\/wunschdenken\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wuenschenswert.net\/wunschdenken\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wuenschenswert.net\/wunschdenken\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wuenschenswert.net\/wunschdenken\/wp-json\/wp\/v2\/comments?post=153"}],"version-history":[{"count":0,"href":"http:\/\/www.wuenschenswert.net\/wunschdenken\/wp-json\/wp\/v2\/posts\/153\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.wuenschenswert.net\/wunschdenken\/wp-json\/wp\/v2\/media?parent=153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wuenschenswert.net\/wunschdenken\/wp-json\/wp\/v2\/categories?post=153"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wuenschenswert.net\/wunschdenken\/wp-json\/wp\/v2\/tags?post=153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}