Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1030E: The operator 'ADD' is not supported between objects of type 'null' and 'null'
at org.springframework.expression.spel.ExpressionState.operate(ExpressionState.java:240) ~[?:?]
at org.springframework.expression.spel.ast.OpPlus.getValueInternal(OpPlus.java:139) ~[?:?]
at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:112) ~[?:?]
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:272) ~[?:?]
at org.springframework.cache.interceptor.CacheOperationExpressionEvaluator.key(CacheOperationExpressionEvaluator.java:104) ~[?:?]
at org.springframework.cache.interceptor.CacheAspectSupport$CacheOperationContext.generateKey(CacheAspectSupport.java:795) ~[?:?]
at org.springframework.cache.interceptor.CacheAspectSupport.generateKey(CacheAspectSupport.java:592) ~[?:?]
at org.springframework.cache.interceptor.CacheAspectSupport.findCachedItem(CacheAspectSupport.java:535) ~[?:?]
at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:402) ~[?:?]
at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:346) ~[?:?]
at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61) ~[?:?]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[?:?]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[?:?]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691) ~[?:?]
at top.maplex.gujianproject.module.npcshop.service.LimitService$$EnhancerBySpringCGLIB$$caf62d54.getLimit(<generated>) ~[?:?]
at top.maplex.gujianproject.module.npcshop.NPCShop.getLimitCache(NPCShop.kt:64) ~[?:?]
at top.maplex.gujianproject.module.npcshop.germui.NPCShopUI.loadCommodity(NPCShopUI.kt:172) ~[?:?]
at top.maplex.gujianproject.module.npcshop.germui.NPCShopUI$special$$inlined$observable$1.afterChange(Delegates.kt:74) ~[?:?]
at kotlin1922.properties.ObservableProperty.setValue(ObservableProperty.kt:41) ~[?:?]
at top.maplex.gujianproject.module.npcshop.germui.NPCShopUI.setNowTable(NPCShopUI.kt:43) ~[?:?]
at top.maplex.gujianproject.module.npcshop.germui.NPCShopUI.loadTable(NPCShopUI.kt:164) ~[?:?]
at top.maplex.gujianproject.module.npcshop.germui.NPCShopUI.<init>(NPCShopUI.kt:106) ~[?:?]
at top.maplex.gujianproject.module.npcshop.NPCShopCommand$open$1$1$3.invoke(NPCShopCommand.kt:45) ~[?:?]
at top.maplex.gujianproject.module.npcshop.NPCShopCommand$open$1$1$3.invoke(NPCShopCommand.kt:40) ~[?:?]
at top.maplex.gujianproject.taboolib.common.platform.command.component.CommandExecutor.exec(CommandExecutor.kt:11) ~[?:?]
at top.maplex.gujianproject.taboolib.common.platform.command.component.CommandBase.execute$process(CommandBase.kt:87) ~[?:?]
at top.maplex.gujianproject.taboolib.common.platform.command.component.CommandBase.execute$process(CommandBase.kt:78) ~[?:?]
at top.maplex.gujianproject.taboolib.common.platform.command.component.CommandBase.execute(CommandBase.kt:100) ~[?:?]
at top.maplex.gujianproject.taboolib.common.platform.command.CommandRegisterKt$command$1.execute(CommandRegister.kt:40) ~[?:?]
at top.maplex.gujianproject.taboolib.platform.BukkitCommand$registerCommand$1.invoke$lambda$0(BukkitCommand.kt:74) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[paper-1.12.2.jar:git-Paper-e39995d21]
... 16 more
从堆栈信息可以看出,该异常与spel
有关。spel
指的是Spring Expression Language
,结合问题代码进行分析,可以认为该异常与spring表达式有关。而在我的代码里,只有@Cacheable
注解里使用到了spel
,如下:
@Cacheable(cacheNames = [CACHE_NAME], key = "#player + #commodityId")
因为这里直接用 + 进行拼接字段 所以导致的问题..
@Cacheable(cacheNames = [CACHE_NAME], key = "#player + ' - ' + #commodityId")
现在就正常了
参与讨论
(Participate in the discussion)
参与讨论