【问题标题】:CAS 5.3 Management - More than one fragment with the name [spring_web] was found. This is not legal with relative orderingCAS 5.3 管理 - 发现多个名为 [spring_web] 的片段。这对于相对排序是不合法的
【发布时间】:2019-10-09 10:16:39
【问题描述】:

我遇到了与下面帖子中描述的完全相同的问题,但我不知道如何使用 cas-management-overlay 的 5.3 分支来实施解决方案。我似乎无法弄清楚在哪里添加绝对排序标签(在 web.xml 中)以及在其中添加什么名称。我的 web.xml 只有几个 servlet 和一堆 mime 映射。我看到的大多数解决方案似乎都是人们编写自己的东西。

另外,我不确定冲突是否在此叠加层内部,或者是否在春季版本的 CAS 和 CAS 管理之间。它们都在 pom.xml 中显示了不同的 spring 版本。我尝试使它们相同并构建,但没有奏效。

如果有任何建议可以为我指明正确的方向,我将不胜感激。

https://github.com/apereo/cas-management-overlay

More than one fragment with the name [spring_web] was found. This is not legal with relative ordering

【问题讨论】:

    标签: java spring-boot spring-mvc tomcat8


    【解决方案1】:

    我遇到了这个问题并解决了。 您可以在导入一些 service-registry 依赖项时排除 spring-web jar。

    <!-- redis service registry-->
    <dependency>
        <groupId>org.apereo.cas</groupId>
        <artifactId>cas-server-support-redis-service-registry</artifactId>
        <version>${cas.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    

    因为cas-management-webapp.5.x.x.warxx-service-registry jar 都使用两个不同的spring-web jar。

    我的 cas-management-webapp 版本是 5.3.6,cas 版本是 5.3.5。

    spring-web'version 在 cas-management-webapp.5.3.6.war 中是 4.3.17,但在 cas-server-support-redis-service-registry jar 中是 4.3.20。

    【讨论】:

      【解决方案2】:

      对于阅读本文的任何人,我通过删除(请参阅重命名)其中一个片段(读取 jar 文件)“解决”了问题,这样就不会出现排序冲突。我不太清楚为什么有两个版本,但我确实做到了

      mv /var/lib/tomcat/cas-management/WEB-INF/lib/spring-web-4.3.17.RELEASE.jar /var/lib/tomcat/cas-management/WEB-INF/lib/spring -web-4.3.17.RELEASE.jar_save20190605

      为了使旧版本无法访问并且它有效。另外,一个稍微不相关的问题,但如果您正在运行 5.3 管理覆盖,您将遇到此问题。您必须删除 cas。 etc/cas/config/management.properties 中设置的前缀,否则对于文件中的不同属性,您将收到类似“Invalid property 'mgmt[userPropertiesFile]”之类的错误。

      【讨论】:

        猜你喜欢
        • 2019-06-14
        • 2019-08-17
        • 2019-12-28
        • 2019-02-18
        • 2019-08-06
        • 2018-03-16
        • 2018-04-20
        • 1970-01-01
        相关资源
        最近更新 更多