spring-bootgroovyresilience4jresilience4j-retry

Missing property (BadRequest) for Groovy template expansion


I'm using Resilience4j and I need to ignore some exceptions when using Retry. One of the exceptions is the: org.springframework.web.reactive.function.client.WebClientResponseException$BadRequest

resilience4j.retry:
  instances:
    testA:
      maxAttempts: 5
      waitDuration: 100ms
      ignoreExceptions:
        - org.springframework.web.reactive.function.client.WebClientResponseException$BadRequest
        - java.net.ConnectException
        - java.lang.ArithmeticException

But I am not able to run the application because of the character $, the error occurs:

Missing property (BadRequest) for Groovy template expansion. Defined keys [parent, inspectClassesForKotlinIC, projects ...

How can I use/escape this character inside application.yml file? The exception I need to ignore is the Bad Request, its full name contains the $. If I remove the $ character the application runs normally, but I can't remove it because it's part of the exception's full name.


Solution

  • I used what @injecteer suggested and it worked:

    try escaping the symbol: $