The code in the `5.7.x` branch is requiring JDK 11 https://github.com/spring-projects/spring-security/blob/f04cd641b035fc1a3bbed671cc84a3c7c19c759a/config/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/resource/OAuth2ResourceServerConfigurer.java#L162 We should fix this and the build should fail if using a language feature that is not compatible with JDK 8.