Skip to content

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

@rellocs

Description

@rellocs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions