小编Mar*_*uez的帖子

为什么我需要排除“spring-boot-starter-logging”才能使用spring-geode?

为了能够使用 spring-geode,我需要排除 starter-logging,否则我会遇到:

Caused by: java.lang.ClassCastException: org.apache.logging.slf4j.SLF4JLogger cannot be cast to org.apache.logging.log4j.core.Logger
at org.apache.geode.internal.logging.LogService.init(LogService.java:81) ~[geode-core-1.2.1.jar:na]
at org.apache.geode.internal.logging.LogService.<clinit>(LogService.java:72) ~[geode-core-1.2.1.jar:na]
... 41 common frames omitted
Run Code Online (Sandbox Code Playgroud)

我的 POM 现在看起来像这样:

 <dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
  <exclusions>
    <exclusion>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-logging</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.springframework.geode</groupId>
  <artifactId>spring-geode-starter</artifactId>
</dependency>
<dependency>
  <groupId>org.springframework.data</groupId>
  <artifactId>spring-data-geode</artifactId>
  <version>2.0.10.RELEASE</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

我该怎么办?

java spring spring-boot geode

3
推荐指数
1
解决办法
2833
查看次数

标签 统计

geode ×1

java ×1

spring ×1

spring-boot ×1