Hey! When the suspend keyword marked a function wi...
# spring
n
Hey! When the suspend keyword marked a function with
Copy code
@Cacheable(value = ["user"], key = "#user.uuid", sync = true) // user.uuid absolutely not null
Error said:
Copy code
Cause: null
               Message: EL1008E: Property or field 'uuid' cannot be found on object of type 'java.lang.Object[]' - maybe not public or not valid?
               Stack: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'uuid' cannot be found on object of type 'java.lang.Object[]' - maybe not public or not valid?
Is there any other way to fix this other than suspend unmarked?
Basically, Cacheable isn’t really compatible with suspend, but deferred is.
n
Brilliant! Thank you ā¤ļø
t
In that same stack overflow post they mention spring 6.1 adds support for this. Maybe upgrading is an option too?