[英]Update existing Spring Boot project from java 1.8 to java 11
Materialised fully functional Spring Boot application code from repository and working fine with java 1.8.物化全功能 Spring 从存储库引导应用程序代码,并与 java 1.8 一起正常工作。 While upgrading to Java 11 got errors like some packages is accessible from more than one module升级到 Java 11 时出现错误,例如可以从多个模块访问某些包
1. The package javax.xml.parsers is accessible from more than one module: <unnamed>, java.xml
1. The package javax.xml.parsers is accessible from more than one module: <unnamed>, java.xml
2. The package org.xml.sax is accessible from more than one module: <unnamed>, java.xml
2. The package org.xml.sax is accessible from more than one module: <unnamed>, java.xml
Tried to resolve the issue by restrict dependency using methods provided in the below links but not helped.试图通过使用以下链接中提供的方法限制依赖来解决问题,但没有帮助。
Eclipse can't find XML related classes after switching build path to JDK 10 Eclipse 将构建路径切换到 JDK 10 后找不到 XML 相关类
https://www.eclipse.org/eclipse/news/4.8/jdt.php#Java9 https://www.eclipse.org/eclipse/news/4.8/jdt.php#Java9
Setting Eclipse JRE设置 Eclipse JRE
Setting Java Version in POM在 POM 中设置 Java 版本
Setting Sping Version设置Sping版本
Archiva dependency integrated to Spring Boot as rootParent Archiva 依赖项集成到 Spring 作为 rootParent 启动
Reason: Conflict between xml.apis
and java.xml
.due to the modularity concept in java Reason: Conflict between xml.apis
and java.xml
.due to the modularity concept in java
Solution: Excluded xml.apis
dependency in maven pom file.解决方案:在 maven pom 文件中排除xml.apis
依赖项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.