Skip to content

The key-generator attribute of cache:annotation-driven element does not work when mode attribute is set to "aspectj" [SPR-8939] #13579

Closed
@spring-projects-issues

Description

@spring-projects-issues

liuchiliang opened SPR-8939 and commented

I want to use custom keyGenerator when I use aspectj compile-time weaving, but the keyGenerator is always DefaultKeyGenerator.
The config is as below:
<cache:annotation-driven mode="aspectj" key-generator="myKeyGenerator"/>
<bean id="myKeyGenerator" class="xxx.MyKeyGenerator"/>

<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cache-manager-ref="ehcache"/>
<bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:config-location="classpath:ehcache.xml"/>

Affects: 3.1 GA

Referenced from: commits c39a14a

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions