Spring Cloud
In Spring Cloud, authentication is usually handled at the gateway. See Spring Cloud Gateway. For a single service, see casdoor-spring-boot-example.
Whether it's in the gateway layer or in a single service, both use the casdoor-spring-boot-starter.