This project contains a Maven project about the Spring Security with JWT.
The project has two classed to configure Spring Security with JWT (these two classes are exclusive).
The main class is com.vincenzoracca.springsecurityjwt.security.SecurityConfig. This configuration is for versions the same or later than Spring Boot 2.7.0.
Alternatively, if you need to use a version prior to Spring Boot 2.7.0, you can use the class com.vincenzoracca.springsecurityjwt.security.SecurityConfigOld.
I wrote a complete article about this topic: https://www.vincenzoracca.com/en/blog/framework/spring/jwt/ (English version)
in Italian: https://www.vincenzoracca.com/blog/framework/spring/jwt/