Spring @Cacheable with SpEL key: always evaluates to null -
i having problem @cacheable , using custom key based on spring expression language. have following code
@cacheable(value = "mycache", key = "#providerdto.identifier") clientvo loadclientvobyproviderdto(providerdto providerdto);
this throwing following error
org.springframework.expression.spel.spelevaluation exception: el1007epos 0): field or property 'identifier' cannot found on null
the providerdto argument not null, have verified many times. docs should work confused. docs give following example
@cacheable(value="books", key="#isbn.rawnumber")
i have tried static method. throws nullpointerexception because providerdto null here.
public static string cachekey(providerdto providerdto) { return providerdto.identifier + "-" + providerdto.clientid + "-" + providerdto.clubid; }
how can debug find out happening? spring 3.2.4-release. @cacheable tag on interface, using standard spring aop , not aspectj far understand should still work fine.
possible duplicate of spelevaluationexception: el1007e:(pos 43): field or property 'group' cannot found on null , spring @cacheable ehcache, spel find null valid object – believe compile without debug information. please check maven configuration; might want post relevant bits here. search pom (or parent pom) maven-compiler-plugin
, line such as:
<debug>false</debug>
Comments
Post a Comment