commons-lang3提示“The type StringEscapeUtils is deprecated”
2018-04-05 23:28:52
2967 次阅读
0 个评论
commons-lang3-3.x.jar 这个jar包里面的 org.apache.commons.lang3.StringEscapeUtils 类可以用来转义特殊字符,3.x之版本提示这个类已过时:
Multiple markers at this line
- The type StringEscapeUtils is deprecated
- The method escapeXml11(String) from the type StringEscapeUtils is
deprecated
看了下这个类的官方文档,很自然地找到了新的替代类——org.apache.commons.text.StringEscapeUtils
因此,使用Maven引用相应的jar包即可解决这个问题:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.2</version>
</dependency>
或者直接去Maven仓库下载这个jar包,下载地址如下
http://central.maven.org/maven2/org/apache/commons/commons-text/1.3/
00
相关话题
- Spring 5.0.3 抛出错误The request was rejected because the URL was not normalized
- Apache commons compress文件打包、压缩
- Apache Commons Compress zip压缩解压
- Apache-Commons CSV读写文件
- java.lang.ClassNotFoundException: javax.xml.bind.JAXBException错误
- 使用commons-vfs监听文件系统
- S3存储桶策略示例
- vue 3 的watchEffect 使用方法
- Thumbnailator处理gif图片时java.lang.ArrayIndexOutOfBoundsException: 4096异常
- MyEclipse启动发生"An error has occurred.See the log file "解决
- 使用commons-io-2.0监听文件变化
- Linux上使用commons-net.jar注意的问题
- AWS S3 SDK 2.0删除文件夹
- Vue3+Vite+Nginx 二级路径部署
- java.lang.NoSuchMethodException: org.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTPictureBaseImpl错误