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
SpEL referencing method parameter not working #1284
Comments
Thanks for reporting. I will look into that. |
Hi, this is surprisingly hard to implement. Have you seen any annotation other than |
I found an example in this article, maybe it will help you understand how it could be done: https://www.springcloud.io/post/2022-03/spel-aop-log/ |
Hi, I try to focus the library for the original purpose - scheduled task lock. I am afraid your use-case is out of the scope. That being said, you can use this approach which should solve your use-case. |
Hi Lukas, I understand your point. IMHO the |
Hi, please correct me if I am wrong, but I do not think there is any SpEL spec of how to resolve method parameters. The only place I could find is the Cacheable annotation and the code seems to be really specific for the use-case of Caching. Moreover, your use-case is clearly not scheduling but generic locking. That being said, if you want to, you can submit a PR. If it does not bring too much complexity to the project, I will be happy to merge it. Otherwise, please implement it just for your project, Spring AOP is not that hard. |
#1284 Added SpEL support to @SchedulerLock name attribute
Released as 5.1.0 |
Since 0.17.0 version ShedLock supports SpEL, but this is not working:
This is what we get in Redis:
Also tried withoud curly braces "{ }"
The text was updated successfully, but these errors were encountered: