如何为oAuth2-sample项目构建war文件?

时间:2015-07-27 08:16:01

标签: java maven security spring-security authentication-flows

我在这里克隆了项目https://github.com/OhadR/oAuth2-sample

在所有3个项目的pom.xml中为父级设置适当的版本oauth2-client,oauth2-auth-server,resource-sercer to

    <version>1.6.2-SNAPSHOT</version>

我将3个项目添加到auth-parent中的modules部分。我使用mvn install.

构建了war文件
<modules>
    <module>auth-common</module>
    <module>common-crypto</module>
    <module>authentication-flows</module>
    <module>oauth2-auth-server</module>
    <module>oauth2-client</module>
    <module>oauth2-resource-server</module>
</modules>

我将3生成war文件放在jetty / webapps中。客户端和资源服务器似乎加载正常,但oauth2-auth-server不行。在localhost:8080我得到了UNAVAILABLE oauth2-auth-server。

我尝试通过为oauth2-auth-server添加maven-jetty pluginmvn jetty:run来进行调试。但是我得到了

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'authenticationSuccessHandler' for bean class [com.ohadr.auth_flows.core.AuthenticationSuccessHandler] conflicts with existing, non-compatible bean definition of same name and class [com.ohadr.oauth_srv.web.OhadAuthenticationSuccessHandler]

0 个答案:

没有答案
相关问题