0

I have a @Controller endpoint which I need to secure with a custom method, defined as a static method in another class, which I load into this project as a dependency (JAR). This is my code:

@PostMapping("/my-list")
@PreAuthorize("'#{securityUtil.isAuthorizedToQuery(principal.getJwtToken(),request.headers['Account-Public-Id'])}'")
public List<TradeList> getTradeList(@RequestBody QueriesRqtDto queriesDto,                                           @RequestHeader("Account-Public-Id") String account) {
    return tradeFinder.find(queriesDto,account);
}

But I get this error:

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.expression.spel.SpelParseException: EL1041E: After parsing a valid expression, there is still more data in the expression: 'Account'

None of the solutions provided in Stack Overflow for similar problems worked for me.

  • 1
    Does this answer your question? [Expression - There is still more in the expression](https://stackoverflow.com/questions/52535442/expression-there-is-still-more-in-the-expression) – dur Apr 12 '23 at 20:17

0 Answers0