Reputation: 792
Is there a way to reference the current instance of the object which contains the SPeL expression?
I am basically looking for something like
@Value("#{otherBean.getClassName(this.GetClass())}")
Where getClassName(Class<T> class)
returns the name of the class, for example.
Upvotes: 6
Views: 2016
Reputation: 174664
No; that is not possible; there is no way to reference the current bean (or class), you can only access beans by name.
Upvotes: 3