lock4j icon indicating copy to clipboard operation
lock4j copied to clipboard

keys 使用Spel 时候报错 EL1007E: Property or field 'name' cannot be found on null

Open rellocs opened this issue 7 months ago • 1 comments

Enviroment

JDK Version: 21

SpringBoot Version: 3.2.4

DynamicDatasourceStarter Version:

Describe

按照README文档里面的使用方式, 希望通过spel指定keys值, @Lock4j(name = "MY_NAME", keys = {"#request.name"}, expire = 10000, autoRelease = false) @PostMapping("/test") public void test(@RequestBody TestRequest request) { // other codes } 带上参数请求接口时候,报以下错误: EL1007E: Property or field 'name' cannot be found on null

Expected Result: 希望能正确解析到body中的字段作为key的一部分

Actual Result:
EL1007E: Property or field 'name' cannot be found on null

Steps to reproduce

  • Step 1

  • Step 2

  • Step 3

rellocs avatar Jul 14 '24 14:07 rellocs