org.apache.naming.resources 包是否已在 tomcat 8.0.20 中删除?

编程入门 行业动态 更新时间:2024-10-27 14:24:22
本文介绍了org.apache.naming.resources 包是否已在 tomcat 8.0.20 中删除?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我正在将嵌入式 tomcat 7 项目迁移到 tomcat 8.0.20 的最新版本编译项目时,我收到编译错误,说找不到 org.apache.naming.resources 包.我也检查了 Tomcat API 文档.那里似乎不存在该包.

I'm working on migrating embedded tomcat 7 project to latest release of tomcat 8.0.20 When compiling the project, I'm getting compilation errors saying that org.apache.naming.resources package can't be found. I've checked the Tomcat API doc too. It seems that the package doesn't exists there.

那个包是从 tomcat 8 中删除的吗?如果是这样,替代方案是什么?

Is that package removed from tomcat 8? If so what is/are the alternative(s) ?

我找不到任何消息来源说它已被删除或弃用.

I couldn't found any source saying that it is been removed or deprecated.

附言我正在使用 DirContextURLStreamHandler,它位于 tomcat 7 的上述包中

P.S I'm using DirContextURLStreamHandler which was resided in above package in tomcat 7

推荐答案

我还没有找到任何关于此的官方详细文档,但我认为它已被 apache tomcat-catalina 库取代.在我的 pom.xml 中,我替换了命名库

I didnt find any official detailed documents about this yet but i think it is replaced by the apache tomcat-catalina library. In my pom.xml i replaced the naming lib

    <dependency>
        <groupId>tomcat</groupId>
        <artifactId>naming-resources</artifactId>
        <version>5.5.23</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.apache.tomcat</groupId>
        <artifactId>tomcat-catalina</artifactId>
        <version>${tomcat.version}</version>
        <scope>provided</scope>
    </dependency>

就我而言,我需要用这个新库中的 StandardRoot 类替换 ProxyDirContext 类.从我目前看到的 Tomcat 8 来看,他们使用了一个新的实现.另请参阅 https://tomcat.apache/migration-8.html#Internal_APIs

In my case i needed to replace the ProxyDirContext class with the StandardRoot class from this new lib. From what i ve seen so far for Tomcat 8 they use a new implementation. See also https://tomcat.apache/migration-8.html#Internal_APIs

一个新的资源实现,它合并了别名、VirtualLoader、VirtualDirContext、JAR 资源和外部存储库合并成一个单个框架,而不是每个功能的单独框架.

A new Resources implementation that merges Aliases, VirtualLoader, VirtualDirContext, JAR resources and external repositories into a single framework rather than a separate one for each feature.

这篇关于org.apache.naming.resources 包是否已在 tomcat 8.0.20 中删除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 03:54:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1389253.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:已在   naming   org   apache   resources

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!