I am using Spring Security for permission checking on methods. I would like to call a private method to collect some data to send to hasPermission()
method. Followi
Private methods cannot be called, but you can refer to "this component" through this.
:
@PreAuthorize("hasPermission(new Object[]{#arg3, /* HERE: */ this.localPublicMethod(#arg1,#arg2)}, 'canDoThis')")
public long publicMethod1(long arg1, long arg2, long arg3)
{
}
public String localPublicMethod(long a1, long a2)
{
}