2015-03-12 2 views
0

Я пытаюсь реализовать OAuth1.0 с помощью пружины безопасности, как это:Spring OAuth в Google App Engine не удается

@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) 

Кто-нибудь знает, как почини это?

ответ

0

Я не нашел ничего лучше, чем создавать собственные экземпляры классов Spring (OAuthRestTemplate, CoreOAuthConsumerSupport) и избавиться от ProxySelector.

Смежные вопросы