在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>
