虽然与RabbitMQ的消息通信被成功地消耗掉,但是,显示以下警告在日志中。
**error occurred while mapping from AMQP properties to MessageHeaders**
lang.IllegalStateException: java.lang.ClassNotFoundException: Class_Name
t org.springframework.integration.mapping.support.JsonHeaders.getClassForValue(JsonHeaders.java:89) ~[spring-integration-core-5.2.4.RELEASE.jar:5.2.4.RELEASE]
at org.springframework.integration.mapping.support.JsonHeaders.buildResolvableType(JsonHeaders.java:72) ~[spring-integration-core-5.2.4.RELEASE.jar:5.2.4.RELEASE]
at org.springframework.integration.amqp.support.DefaultAmqpHeaderMapper.createJsonResolvableTypHeaderInAny(DefaultAmqpHeaderMapper.java:169) [spring-integration-amqp-5.2.4.RELEASE.jar:5.2.4.RELEASE].
我知道这只是一个警告,但我想知道它是可以避免的方式。
提前感谢
此问题已在Spring Integration 5.2.5
:https://github.com/spring-projects/spring-integration/issues/3223中修复。请考虑升级到最新的Spring Boot 2.2.6
,它已包含在其中。参见Spring Boot docs如何覆盖依赖版本:https://docs.spring.io/spring-boot/docs/2.2.6.RELEASE/reference/html/using-spring-boot.html#using-boot-maven
您可以应用其他解决方法,如该GH问题中所述。