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