-
Notifications
You must be signed in to change notification settings - Fork 132
SpEL expression fails evaluation when using ReactiveEvaluationContextExtension #658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for report. The reported issue is a bug within |
After fixing the issue in Spring Data, I get the following stack trace:
|
It seems that the imperative |
…dbcRepositoryFactoryBean. We now correctly in initialize ReactiveQueryMethodEvaluationContextProvider in the repository factory bean. Previously, we used an empty instance of ReactiveQueryMethodEvaluationContextProvider that didn't consider registered extensions. Closes #658
…dbcRepositoryFactoryBean. We now correctly in initialize ReactiveQueryMethodEvaluationContextProvider in the repository factory bean. Previously, we used an empty instance of ReactiveQueryMethodEvaluationContextProvider that didn't consider registered extensions. Closes #658
@mp911de Is there an issue for your mentioned bug? |
@svenuthe not yet. Feel free to file one at https://github.com/spring-projects/spring-data-commons/issues |
While working on introducing a
ReactiveEvaluationContextExtension
in Spring Security (spring-projects/spring-security#8958), I used Spring Data R2DBC as an example of usage, but it seems the SpEL expressions are not resolved correctly. I tried several options, but I keep getting error messages like the following:EL1008E: Property or field 'authentication' cannot be found on object of type 'java.lang.Object[]' - maybe not public or not valid?
@jzheaux tried the same implementation of the ReactiveEvaluationContextExtension in Spring Data Mongo and it worked correctly there. It looks like it's a problem specific to Spring Data R2DBC. A similar error was reported in #576.
I have built a small project to demonstrate the error: https://github.com/ThomasVitale/spring-security-data-reactive-example
After running the application, first create a new book:
curl -v -X POST -u isabelle:password -H 'Content-Type: application/json' localhost:8080/books -d '{"name": "The Hobbit"}'
Then, try fetching the books created by the currently authenticated user:
curl -v -u isabelle:password localhost:8080/books
The text was updated successfully, but these errors were encountered: