required a bean of type 'org.springframework.jms.core.JmsMessagingTemplate' that could not be found


問題來源
  Spring Boot 項目集成 ActiveMQ。
報錯內容
  Description:Field jmsTemplate in XXX required a bean of type 'org.springframework.jms.core.JmsMessagingTemplate' that could not be found.
原因分析
  在配置文件中配置ActiveMQ的時候,某些項,例如spring.activemq.pool.enabled,的值末尾有空格,導致系統讀取配置文件信息的時候,讀取到了追加了空格的值,而非我們預期的值:
spring.activemq.broker-url=tcp://localhost:61616
spring.activemq.in-memory=true空格 spring.activemq.pool.enabled=false空格

  備注:true和false后面被無意中加上了空格。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM