Skip to content

Commit a68abe6

Browse files
authored
Merge pull request #18320 from panos-kakos/JAVA-43810
[JAVA-43810]Fixed integration
2 parents 5d11588 + e3d6887 commit a68abe6

File tree

3 files changed

+25
-24
lines changed

3 files changed

+25
-24
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xmlns="http://www.ehcache.org/v3"
3+
xmlns:jsr107="http://www.ehcache.org/v3/jsr107"
4+
xsi:schemaLocation="
5+
http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core-3.0.xsd
6+
http://www.ehcache.org/v3/jsr107 http://www.ehcache.org/schema/ehcache-107-ext-3.0.xsd">
7+
8+
<cache alias="books">
9+
<key-type>java.lang.String</key-type>
10+
<value-type>com.baeldung.springdatacaching.model.Book</value-type>
11+
<expiry>
12+
<ttl unit="seconds">30</ttl>
13+
</expiry>
14+
15+
<resources>
16+
<heap unit="entries">2</heap>
17+
<offheap unit="MB">10</offheap>
18+
</resources>
19+
</cache>
20+
21+
</config>

spring-boot-modules/spring-boot-caching-2/src/test/resources/application.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ spring.jpa.show-sql=false
1111
# Connection details
1212
#spring.redis.host=localhost
1313
#spring.redis.port=6379
14-
server.port=8000
14+
server.port=8000
15+
16+
#ehcache
17+
spring.cache.jcache.config=classpath:ehcache.xml

spring-boot-modules/spring-boot-caching/src/main/resources/ehcache.xml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,5 @@
2727
<offheap unit="MB">10</offheap>
2828
</resources>
2929
</cache>
30-
31-
<cache alias="books">
32-
<key-type>java.lang.String</key-type>
33-
<value-type>com.baeldung.springdatacaching.model.Book</value-type>
34-
<expiry>
35-
<ttl unit="seconds">30</ttl>
36-
</expiry>
37-
38-
<listeners>
39-
<listener>
40-
<class>com.baeldung.cachetest.config.CacheEventLogger</class>
41-
<event-firing-mode>ASYNCHRONOUS</event-firing-mode>
42-
<event-ordering-mode>UNORDERED</event-ordering-mode>
43-
<events-to-fire-on>CREATED</events-to-fire-on>
44-
<events-to-fire-on>EXPIRED</events-to-fire-on>
45-
</listener>
46-
</listeners>
47-
48-
<resources>
49-
<heap unit="entries">2</heap>
50-
<offheap unit="MB">10</offheap>
51-
</resources>
52-
</cache>
5330

5431
</config>

0 commit comments

Comments
 (0)