Passing varargs to Spring spEL causes “Method cannot be found on com.sun.proxy”
问题 I try to write custom class for permissions evaluation, so it can be used with Spring Security @PreAuthorize and Spring Expression Language like for example this ( authority is just a regular Spring component with some role names): @PreAuthorize("@permissionEvaluator.anyOfRoles(@authority.ADMIN)") The PermissionEvaluator#anyOfRoles method declaration looks like follows: boolean anyOfRoles(String... roles) As shown this method takes varargs of String type. It works fine when only one parameter