Skip to content

Code example bug in Cache Abstraction document [SPR-8708] #13350

@spring-projects-issues

Description

@spring-projects-issues

Keesun Baik opened SPR-8708 and commented

http://static.springsource.org/spring/docs/3.1.0.M2/spring-framework-reference/html/cache.html

In this documents, 28.4.2's example code has some bugs.

[xml]
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhcacheCacheManager" p:cache-manager="ehcache"/>

<!-- Ehcache library setup -->
<bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:config-location="ehcache.xml"/>
[/xml]

This code should be fixed like below.

[xml]
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhcacheCacheManager" p:cacheManager-ref="ehcache"/>

<!-- Ehcache library setup -->
<bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:configLocation="ehcache.xml"/>
[/xml]

  • p:cache-manager="ehcache" => p:cacheManager-ref="ehcache"
  • p:config-location="ehcache.xml" => p:configLocation="ehcache.xml"

Affects: 3.1 M2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions