2015-01-26 83 views
1

在授权码和accesstoken服务上获得404我试图将spring security oauth2从1.0.5.Release升级到2.0.5.Release。升级Spring-security-oauth2 1.0.5.RELEASE到2.0.5.RELEASE正在获取404

我使用的是spring security 3.2.5版本,spring core 3.2.13和spring oauth2 2.0.5.Release。

  • 我们是否需要Spring 4 for spring-oauth2-2.0.5.Release?
  • 我是否需要使用java config for spring-oauth2-2.0.5.Release?
  • 当我使用相同的XML 在1.0.5工作的配置不工作在 spring-oauth2-2.0.5.Release?

回答

0

我们是否需要弹簧4 for spring-oauth2-2.0.5.Release?

是的,我相信是的。

我需要使用java config for spring-oauth2-2.0.5.Release吗?

当我使用相同的XML配置这在1.0.5不列入工作工作在弹簧oauth2-2.0.5.Release?

这是一个问题吗?它应该工作,但没有更多的细节,这将是很难说。 2.0中有一些API更改,因此取决于您所做的定制,您可能需要也可能不需要重新实现它的一部分。

404是非常通用的,所以也许你的整个应用程序只是无法启动?不可能说没有更多的数据。

+0

感谢戴夫的信息。 – Trilok 2015-01-29 22:59:22

0

我发现的主要事情,改变了令牌商店包其中,例如改变这样:

<bean id="tokenStore" class="org.springframework.security.oauth2.provider.token.InMemoryTokenStore" /> 

成为

<bean id="tokenStore" class="org.springframework.security.oauth2.provider.token.store.InMemoryTokenStore" /> 

而且以前在1.0.5我曾用TokenServicesUserApprovalHandler我在任何包中都找不到。我删除了我已经添加到oauth:授权服务器的那个类和user-approval-handler-ref =“userApprovalHandler”的引用。矿山似乎正在2.0.5上工作,希望这有助于。