http
    ...
    .anyRequest()
    .authenticated()
    .accessDecisionManager(accessDecisionManager());


OR

http.authorizedRequests()
.accessDecisionManager(accessDecisionManager);



https://www.baeldung.com/spring-security-custom-voter

Custom Spring Security with AccessDecisionVoters | Baeldung

A quick and practical guide to customizing Spring Security with AccessDecisionVoters

www.baeldung.com


Posted by 張's blog
,