org.apache.naming.resources 包是否已在 tomcat 8.0.20 中删除? [英] Is org.apache.naming.resources package have been removed in tomcat 8.0.20?

查看:22
本文介绍了org.apache.naming.resources 包是否已在 tomcat 8.0.20 中删除?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将嵌入式 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.org/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.org/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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆