【问题标题】:How to build the war files for oAuth2-sample project?如何为 oAuth2-sample 项目构建战争文件?
【发布时间】: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 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]

【问题讨论】:

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


    【解决方案1】:

    不确定我是否看到了问题 - 您是否尝试使用 maven 命令“mvn clean install”从主目录构建它?

    Maven 随后将构建所有子模块,即 common-cryptoauthentication-flows

    我的 oAuth-Sample 项目正在用作 oAuth 示例以及 "authentication-flows" logic

    您是为 oAuth-sample 还是为“authentication-flows”构建此 oAuth-sample?

    希望对您有所帮助(对延迟表示歉意)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-02-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-22
      • 2013-11-17
      • 2018-10-06
      相关资源
      最近更新 更多