【发布时间】:2015-05-14 19:37:23
【问题描述】:
我正在尝试使用这样的 Spring Security 实现 OAuth1.0:
@Bean
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public RestOperations twitterOAuthRestTemplate() {
return new OAuthRestTemplate(twitterOAuthDetails());
}
但它在运行时失败:
jjava.lang.NoClassDefFoundError: java.net.ProxySelector is a restricted class. Please see the Google App Engine developer's guide for more details.
at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
at org.springframework.security.oauth.consumer.client.CoreOAuthConsumerSupport.<init>(CoreOAuthConsumerSupport.java:64)
at org.springframework.security.oauth.consumer.client.OAuthRestTemplate.<init>(OAuthRestTemplate.java:17)
at org.springframework.security.oauth.consumer.client.OAuthRestTemplate.<init>(OAuthRestTemplate.java:20)
有人知道怎么解决吗?
【问题讨论】:
标签: java spring google-app-engine oauth spring-security