Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
spring-projects-issues opened this issue Sep 19, 2011 · 3 comments
Closed
Labels
type: bug A general bug type: documentation A documentation task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

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

@spring-projects-issues
Copy link
Collaborator Author

Keesun Baik commented

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

=>

<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cacheManager-ref="ehcache"/>
Sorry, There was a miss-spelling.

@spring-projects-issues
Copy link
Collaborator Author

Costin Leau commented

Actually only cache-manager-ref needs to be changed - the p: namespace understands camel case expressed through the dash (-).

@spring-projects-issues
Copy link
Collaborator Author

Keesun Baik commented

Yes, That's right. Only the cache-manager needs to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

1 participant