在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就是密码所在的位置,但是默认情况下是没有使用的,需要增加插件
- <plugins>
- <simpleAuthenticationPlugin>
- <users>
- <authenticationUser username="${activemq.username}" password="${activemq.password}" groups="users,admins"/>
- </users>
- </simpleAuthenticationPlugin>
- </plugins>