<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Ehcache on Java &amp; Moi</title><link>https://javaetmoi.com/tags/ehcache/</link><description>Recent content in Ehcache on Java &amp; Moi</description><generator>Hugo</generator><language>fr</language><lastBuildDate>Fri, 10 Feb 2017 07:40:20 +0000</lastBuildDate><atom:link href="https://javaetmoi.com/tags/ehcache/feed.xml" rel="self" type="application/rss+xml"/><item><title>Up-to-date Spring Framework Petclinic presentation</title><link>https://javaetmoi.com/2017/02/spring-framework-petclinic-presentation/</link><pubDate>Fri, 10 Feb 2017 07:40:20 +0000</pubDate><guid isPermaLink="false">http://javaetmoi.com/?p=1672</guid><description>&lt;p&gt;Spring Petclinic is a sample application that has been designed to show how the Spring Framework can be used to build simple but powerful database-­oriented applications.
The « canonical » version of Spring Petclinic is based on Spring Boot and Thymeleaf. But many forks exists: distributed version (microservices) built with Spring Cloud, React, AngularJS. The fork we are talking about is named &lt;strong&gt;Spring&lt;/strong&gt; &lt;strong&gt;Framework&lt;/strong&gt; &lt;strong&gt;Petclinic&lt;/strong&gt;. It maintains a Petclinic version both with a &lt;strong&gt;plain old Spring Framework configuration&lt;/strong&gt; and a &lt;strong&gt;3-layer architecture&lt;/strong&gt; (i.e. presentation &amp;ndash;&amp;gt; service &amp;ndash;&amp;gt; repository).&lt;/p&gt;</description></item><item><title>Désendettement du projet ehcache-spring-annotations</title><link>https://javaetmoi.com/2014/12/migration-projet-ehcache-spring-annotations/</link><pubDate>Mon, 01 Dec 2014 05:53:51 +0000</pubDate><guid isPermaLink="false">http://javaetmoi.com/?p=1273</guid><description>&lt;p&gt;EhCache est sans nul doute le framework open source de gestion de cache applicatif le plus populaire parmi les développeurs Java. Polyvalent, &lt;strong&gt;EhCache&lt;/strong&gt; peut être mis en œuvre dans les différentes couches d’une application web :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="wp-content/uploads/2014/05/logo-spring-highres.png"&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt="logo-spring-highres"
class="image_figure image_internal image_unprocessed"
src="https://javaetmoi.com/wp-content/uploads/2014/05/logo-spring-highres.png"
/&gt;
&lt;/picture&gt;
&lt;/figure&gt;
&lt;/a&gt; Persistance : utilisé comme cache de niveau 2 de JPA / Hibernate pour stocker des entités et le résultat des requêtes en base.&lt;/li&gt;
&lt;li&gt;Service métier : mise en cache du résultat d’un service métier ou d’un appel de web service&lt;/li&gt;
&lt;li&gt;Présentation : cache de pages ou de fragments de page HTML&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Habitués à gérer la sécurité et les transactions de manière déclarative à l’aide d’annotations, le projet open source &lt;a href="https://code.google.com/p/ehcache-spring-annotations/"&gt;ehcache-spring-annotations&lt;/a&gt; a fait le bonheur des développeurs Spring en 2010 en introduisant l’ &lt;strong&gt;annotation @Cacheable&lt;/strong&gt;
Hébergé sur Google Code, ce projet n’est aujourd’hui plus maintenu. Il ne supporte pas Spring 4.x. Rattrapant son retard, la version 3.1 du framework Spring a été enrichi de sa propre annotation @Cacheable. Comme à son habitude, Spring permet de s’abstraire de la solution de cache sous-jacente (ex : ConcurrentMap, EhCache, Guava …) en proposant une API générique. Les débuts de cette API ont été difficiles (cf. SPR-10237 à laquelle j’ai participé). Aujourd’hui mature, implémentant la JSR-107 JCache, il n’y a aucune raison pour ne pas migrer dessus.
Relativement court &lt;strong&gt;, ce billet explique pas à pas comment migrer de ehcache-spring-annotations vers le support de cache du framework Spring&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt="logo-spring-highres"
class="image_figure image_internal image_unprocessed"
src="https://javaetmoi.com/wp-content/uploads/2014/05/logo-spring-highres.png"
/&gt;
&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item></channel></rss>