温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

ActiveMQ之web管理console

发布时间:2020-08-19 19:22:49 来源:网络 阅读:7652 作者:乾坤刀 栏目:软件技术

activeMQ有一个web管理端。
启动方式:./bin/activemq

关于jetty.xml、jetty-realm.properties、web.xml

jetty.xml配置IP和port默认是8161.

<bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start">
      <property name="host" value="0.0.0.0"/>
      <property name="port" value="8162"/>
</bean>

jetty.xml不同角色的访问权限。

    <bean id="securityLoginService" class="org.eclipse.jetty.security.HashLoginService">
            <property name="name" value="ActiveMQRealm" />
            <property name="config" value="${activemq.conf}/jetty-realm.properties" />
    </bean>

    <bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint">
            <property name="name" value="BASIC" />
            <property name="roles" value="user,admin" />
            <property name="authenticate" value="true" />
    </bean>
    <bean id="adminSecurityConstraint" class="org.eclipse.jetty.util.security.Constraint">
            <property name="name" value="BASIC" />
            <property name="roles" value="admin" />
            <property name="authenticate" value="true" />
    </bean>
    <bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
            <property name="constraint" ref="securityConstraint" />
            <property name="pathSpec" value="/api/*,/admin/*,*.jsp" />
    </bean>
    <bean id="adminSecurityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
            <property name="constraint" ref="adminSecurityConstraint" />
            <property name="pathSpec" value="*.action" />
    </bean>

jetty-realm.properties配置用户名和密码以及角色分类

admin: admin123, admin
user: user123, user

控制界面
ActiveMQ之web管理console

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI