Sample Code showing how to secure a REST Api with Spring Boot and Spring Security.
Spring Boot 2.6.x - Spring Security - Rest Api Security Example