I'm trying to run an sample application using spring boot and spring security oauth with a configured JdbcTokenStore and a DefaultTokenServices with infinite lifetime access tokens.
Running this application with gradle bootRun, the application won't start and throws an "Caused by: java.lang.ClassCastException: com.sun.proxy.$Proxy51 cannot be cast to org.springframework.security.oauth2.provider.token.DefaultTokenServices"
Why is there a proxy wrapped around the DefaultTokenServices bean?
A strange thing is - running the application with the InMemoryTokenStore ... everything works fine (See inmemory branch).
Source Code https://github.com/grafjo/oauth_demo/blob/master/src/main/java/demo/AuthorizationServerConfiguration.java
Full Trace: http://pastebin.com/SUcwz4S5