java - 错误:(14, 33) java: 无法访问 org.springframework.core.env.EnvironmentCapable
问题描述
我正在尝试在 uniCenta 开源 POS 版本 4.4.2 中添加 Spring Boot 支持。该版本的 uniCenta 是基于 maven 的桌面应用程序。我收到Error:(14, 33) java: cannot access org.springframework.core.env.EnvironmentCapable class file for org.springframework.core.env.EnvironmentCapable not found错误。我添加了以下依赖项:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.7.RELEASE</version>
<relativePath/>
</parent>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.0.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-amqp</artifactId>
<version>1.1.4.RELEASE</version>
</dependency>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
如果有人想查看完整的 POM.xml 文件,请单击此处https://github.com/MuzammalHussain6313/muzammal-ionic/blob/master/pom.xml
我还在stackoverflow答案推荐的依赖项中应用了一些更改(如依赖项范围)。
我仍然遇到同样的错误。我现在该怎么办?请帮忙。
解决方案
推荐阅读
- python - 如何在不使用 numpy histogram 的情况下制作直方图
- spring - 部署到 Apache Tomcat 时使用 jasypt-spring-boot
- java - 通过 RestTemplate 将文件作为字节 [] 从 Java 服务发送到 Java 服务时,是否需要额外的 base64 编码?
- azure - 可以与 2 个 azure vnet (A -- B) 对等,其中一个 vnet 已经有一个现有对等点,其中一个 vnet (C) 具有重叠的 cidr 范围?
- python - 如何将变量分配给“格式化程序”函数?
- amazon-web-services - 在 Spark 中编写一个伪造的 Redshift 自动增量密钥
- vb.net - 如何在 vb.net 中使用扩展器提供程序
- dataset - AI Habitat 的 Image Extractor 在导入 Matterport 数据集时会产生配置错误
- amazon-s3 - 高效的 Nuxt 生成的静态站点托管:在 Amazon AWS 或 Cloud Droplet 上更好
- symfony - Symfony / Encore:树枝过滤器 encore_entry 无法解析链接 {{ encore_entry_script_tags('app') }}