gpt4 book ai didi

java - Maven CAS 和 Restfullapi

转载 作者:行者123 更新时间:2023-11-30 07:11:02 24 4
gpt4 key购买 nike

我有一个添加restfullapi的CAS安装。我放入CAS web.xml

<servlet>
<servlet-name>restlet</servlet-name>
<servlet-class>com.noelios.restlet.ext.spring.RestletFrameworkServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>restlet</servlet-name>
<url-pattern>/v1/*</url-pattern>
</servlet-mapping>

创建reSTLet-servlet.xml 文件并放入 CAS pom.xml:

    <dependency>
<groupId>org.jasig.cas</groupId>
<artifactId>cas-server-integration-restlet</artifactId>
<version>${cas.version}</version>
<type>jar</type>
</dependency>

现在 Eclipse 向我显示有关缺少 Artifact 的错误:

com.noelios.restlet.ext.servlet.jar:1.1.1
com.noelios.restlet.ext.spting.jar:1.1.1
org.restlet.jar:1.1.1
org.restlet.spring.jar:1.1.1

我有一个带有 nexus 存储库的 .m2 设置文件。我输入:

    <mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
...(allready configured mirror)
</mirror>
<mirror>
<id>maven-restlet</id>
<mirrorOf>com.noelios,org.restlet</mirrorOf>
<url>http://maven.restlet.org</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>maven-restlet</id>
<name>Public online Restlet repository</name>
<url>http://maven.restlet.org/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>

如何添加 http://maven.restlet.org存储到我的 CAS 项目并删除这些错误?

最佳答案

您应该将这些 Maven 依赖项添加到您的 pom 文件中:

<dependency>
<groupId>com.noelios.restlet</groupId>
<artifactId>com.noelios.restlet.ext.servlet</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.noelios.restlet</groupId>
<artifactId>com.noelios.restlet.ext.spring</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.restlet</groupId>
<artifactId>org.restlet</artifactId>
<version>1.1.1</version>
</dependency>

关于java - Maven CAS 和 Restfullapi,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39248026/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com