批注接口 DynamicParam


@Retention(RUNTIME) @Target(PARAMETER) public @interface DynamicParam
This method should only be used to decorate the parameters of abstract methods in derived interfaces of JRepository or KRepository.

When a parameter is null

  • If this annotation is present, the SQL condition is ignored, meaning dynamic query is performed.
  • If this annotation is not present, NullPointerException will be raised