【发布时间】:2015-12-21 05:36:39
【问题描述】:
我在这里克隆了项目https://github.com/OhadR/oAuth2-sample
为所有3个项目oauth2-client、oauth2-auth-server、resource-sercer的pom.xml中的父级设置适当的版本
<version>1.6.2-SNAPSHOT</version>
我将 3 个项目添加到 auth-parent 中的模块部分。我使用mvn install.构建了战争文件
<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 plugin 和 mvn 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]
【问题讨论】:
标签: java maven security spring-security authentication-flows