学无先后,达者为师

网站首页 编程语言 正文

Property or field ‘xxx‘ cannot be found on object of type ‘org.xx.xxObject‘ - maybe not public?问题解决

作者:born_stubborn 更新时间: 2022-08-15 编程语言

先看问题

org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'selectIndexList' cannot be found on object of type 'org.springframework.cache.interceptor.CacheExpressionRootObject' - maybe not public?
	at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:226)
	at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:94)
	at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:81)
	at org.springframework.expression.spel.ast.OpMinus.getValueInternal(OpMinus.java:98)
	at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:121)
	at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:262)
	......

在springboot集成redis的时候遇到了问题:
EL1008E: Property or field ‘selectIndexList’ cannot be found on object of type ‘org.springframework.cache.interceptor.CacheExpressionRootObject’ - maybe not public?
at

解决方法:

				  ⬇️             ⬇️
@Cacheable(key = "'selectIndexList'",value = "banner") //redis缓存注解

可能是少了单引号

原文链接:https://blog.csdn.net/born_stubborn/article/details/126336686

栏目分类
最近更新