Spring Security annotation @PreAuthorize(“permitAll()”) doesn’t work in Spring GraphQL
I want to build a authentication system by Bearer Token. There’s some methods that I want to be accessible without being authenticate, but when I was stating to build can’t make this work, It always return 401 Unauthorized and a json. I’m using Spring Boot 3.3.0 with Java 21.