MojoFailureException |找不到符号:com.hazelcast.config.MaxSizeConf



我正在将我的微服务从1.5.4版本升级到2.5.2。

我在构建项目时遇到当前问题。据我所知,这可能是因为项目的依赖项或源有问题。此版本的spring引导升级到Hazelcast 4,同时保持与Hazelcast 3.2.x的兼容性。如果您还没有准备好切换到Hazelcast 4,您可以使用Hazelcast进行降级。版本属性。如果我们的应用程序是3.10.2版本,这个库将不会在这个用户故事的上下文中升级。

然而,我有以下问题:

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Repo/microservices/eco-microservices/functional/translator-service/src/main/java/com/economical/microservices/translator/config/HazelcastConfiguration.java:[10,28] cannot find symbol
symbol:   class MaxSizeConfig
location: package com.hazelcast.config
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  45.408 s
[INFO] Finished at: 2021-08-06T21:46:04+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project translator-service: Compilation failure
[ERROR] /C:/Repo/microservices/eco-microservices/functional/translator-service/src/main/java/com/economical/microservices/translator/config/HazelcastConfiguration.java:[10,28] cannot find symbol
[ERROR]   symbol:   class MaxSizeConfig
[ERROR]   location: package com.hazelcast.config
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

跟在pom文件片段后面:

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency>

<!-- Spring Framework Caching Support -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-spring</artifactId>
</dependency>
<!-- JSON Libraries -->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
</dependency>
<!-- Spring Data JPA -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>

你能帮我理解是什么问题吗?

您没有定义要使用的依赖项的版本。在最新版本的Hazelcast中,似乎不再有任何MaxSizeConfig类了。

最新更新