activemq設置登錄用戶名和密碼


在activemq服務的根目錄下/conf/activemq.xml中有這樣一個bean值:

<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>
</bean>

 

這個文件/conf/credentials.properties就是密碼所在的位置,但是默認情況下是沒有使用的,需要增加插件

  1.    <plugins>   
  2.         <simpleAuthenticationPlugin>   
  3.             <users>   
  4.                 <authenticationUser username="${activemq.username}" password="${activemq.password}" groups="users,admins"/>   
  5.             </users>   
  6.         </simpleAuthenticationPlugin>   
  7.     </plugins>   


免責聲明!

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



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