您当前的位置: 首页 >  spring

qq_34412985

暂无认证

  • 2浏览

    0关注

    1061博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Caused by: org.springframework.jms.support.converter.MessageConversionException: Could not convert J

qq_34412985 发布时间:2021-03-16 17:10:07 ,浏览量:2

使用activeMq报错:

Caused by: org.springframework.jms.support.converter.MessageConversionException: Could not convert JMS message; nested exception is javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException: Forbidden class java.util.ArrayList! This class is not trusted to be serialized as ObjectMessage payload. Please take a look at http://activemq.apache.org/objectmessage.html for more information on how to configure trusted classes.

在application.properties文件中添加spring.activemq.packages.trust-all=true可以解决这个报错

在application.yml中:

server:   port: 80 spring:   activemq:     broker-url: tcp://localhost:61616     user: admin     password: admin        pool:       enabled: true       #连接池最大连接数       max-connections: 5       #空闲的连接过期时间,默认为30秒       idle-timeout: 0     packages:       trust-all: true   jms:     pub-sub-domain: true

 

关注
打赏
1653291990
查看更多评论
立即登录/注册

微信扫码登录

0.0443s