I add to my project a class CustomPermissionEvaluator, configured by a configuration class MethodSecurityConfig, but when I try run my application, after I inform my login c
You don't show the code where you use hasPermission('admin_main').
Although it is wrong anyway: your CustomPermissionEvaluator doesn't have a method with single argument. Or in terms of Spring Security like this:
boolean hasPermission(Authentication authentication, Object permission);
Maybe do you want to use hasRole('admin_main') ?..
The main your problem that you don't provide enough arguments for method implementations.