org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 0): Method call: Method hasIpAddress(java.lang.String) cannot be found on org.springframework.security.access.expression.method.MethodSecurityExpressionRoot type

Stack Overflow | uksz | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Failed to evaluate epxression 'hasIpAddress(..)' in PreAuthorize

    Stack Overflow | 6 months ago | uksz
    org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 0): Method call: Method hasIpAddress(java.lang.String) cannot be found on org.springframework.security.access.expression.method.MethodSecurityExpressionRoot type

    Root Cause Analysis

    1. org.springframework.expression.spel.SpelEvaluationException

      EL1004E:(pos 0): Method call: Method hasIpAddress(java.lang.String) cannot be found on org.springframework.security.access.expression.method.MethodSecurityExpressionRoot type

      at org.springframework.expression.spel.ast.MethodReference.findAccessorForMethod()
    2. Spring Expression Language (SpEL)
      SpelNodeImpl.getTypedValue
      1. org.springframework.expression.spel.ast.MethodReference.findAccessorForMethod(MethodReference.java:211)[spring-expression-4.2.3.RELEASE.jar!/:4.2.3.RELEASE]
      2. org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:125)[spring-expression-4.2.3.RELEASE.jar!/:4.2.3.RELEASE]
      3. org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:85)[spring-expression-4.2.3.RELEASE.jar!/:4.2.3.RELEASE]
      4. org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:131)[spring-expression-4.2.3.RELEASE.jar!/:4.2.3.RELEASE]
      4 frames