We wrote a custom ClientDetailsService for our OAuth2 authorization server:
public class MyClientDetailsService implements ClientDetailsService {
@Override
public ClientDetails loadClientByClientId(String clientId) {
log.info("Got called!");
...
}
}
The log looks like that:
... Got called!
... Got called!
... Got called!
... Got called!
... Got called!
... Got called!
Dependency:
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>2.1.11.RELEASE</version>
</dependency>
In the official git-hub the topic was already discussed, but until today nothing was fixed so far. (https://github.com/spring-projects/spring-security-oauth/issues/141)
My question is, does anybody know a workaround for this problem? We are accessing our database with every invocation and it is very memory consuming.