activemq默认没有为连接启用安全机制,需要手工启用
activemq.xml中
/conf/credentials.properties是用户密码保存文件
还需要在activemq.xml中加入插件
activemq.xml中
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>
</bean>
/conf/credentials.properties是用户密码保存文件
还需要在activemq.xml中加入插件
<plugins>
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="${activemq.username}" password="${activemq.password}" groups="users,admins"/>
</users>
</simpleAuthenticationPlugin>
</plugins>