activemq无账户密码登录配置修改

activemq版本   5.15.0

程序路径  /app/activemq61616.1616/

配置文件路径     /app/activemq61616.1616/conf

修改配置文件jetty.xml第32行跟38行,true改为false

activemq无账户密码登录配置修改_第1张图片

修改完成,重启MQ服务。

 

jetty.xml配置文件内容如下

  1     
 14     
 19 "http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 20     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
 21 
 22     id="securityLoginService" class="org.eclipse.jetty.security.HashLoginService">
 23         "name" value="ActiveMQRealm" />
 24         "config" value="${activemq.conf}/jetty-realm.properties" />
 25     
 26 
 27     id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint">
 28         "name" value="BASIC" />
 29         "roles" value="user,admin" />
 30         
 31         "authenticate" value="false" />
 32     
 33     id="adminSecurityConstraint" class="org.eclipse.jetty.util.security.Constraint">
 34         "name" value="BASIC" />
 35         "roles" value="admin" />
 36          
 37         "authenticate" value="false" />
 38     
 39     id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
 40         "constraint" ref="securityConstraint" />
 41         "pathSpec" value="/api/*,/admin/*,*.jsp" />
 42     
 43     id="adminSecurityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
 44         "constraint" ref="adminSecurityConstraint" />
 45         "pathSpec" value="*.action" />
 46     
 47     
 48     id="rewriteHandler" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
 49         "rules">
 50             
 51                 id="header" class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
 52                   "pattern" value="*"/>
 53                   "name" value="X-FRAME-OPTIONS"/>
 54                   "value" value="SAMEORIGIN"/>
 55                 
 56             
 57         
 58     
 59     
 60     id="secHandlerCollection" class="org.eclipse.jetty.server.handler.HandlerCollection">
 61         "handlers">
 62             
 63                    "rewriteHandler"/>
 64                 "org.eclipse.jetty.webapp.WebAppContext">
 65                     "contextPath" value="/admin" />
 66                     "resourceBase" value="${activemq.home}/webapps/admin" />
 67                     "logUrlOnStart" value="true" />
 68                 
 69                 "org.eclipse.jetty.webapp.WebAppContext">
 70                     "contextPath" value="/api" />
 71                     "resourceBase" value="${activemq.home}/webapps/api" />
 72                     "logUrlOnStart" value="true" />
 73                 
 74                 "org.eclipse.jetty.server.handler.ResourceHandler">
 75                     "directoriesListed" value="false" />
 76                     "welcomeFiles">
 77                         
 78                             index.html
 79                         
 80                     
 81                     "resourceBase" value="${activemq.home}/webapps/" />
 82                 
 83                 id="defaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler">
 84                     "serveIcon" value="false" />
 85                 
 86             
 87         
 88         
 89     id="securityHandler" class="org.eclipse.jetty.security.ConstraintSecurityHandler">
 90         "loginService" ref="securityLoginService" />
 91         "authenticator">
 92             "org.eclipse.jetty.security.authentication.BasicAuthenticator" />
 93         
 94         "constraintMappings">
 95             
 96                 "adminSecurityConstraintMapping" />
 97                 "securityConstraintMapping" />
 98             
 99         
100         "handler" ref="secHandlerCollection" />
101     
102 
103     id="contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
104     
105 
106     id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start">
107              
108         "host" value="0.0.0.0"/>
109         "port" value="1616"/>
110     
111 
112     id="Server" depends-on="jettyPort" class="org.eclipse.jetty.server.Server"
113         destroy-method="stop">
114 
115         "handler">
116             id="handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
117                 "handlers">
118                     
119                         "contexts" />
120                         "securityHandler" />
121                     
122                 
123             
124         
125 
126     
127 
128     id="invokeConnectors" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
129         "targetObject" ref="Server" />
130         "targetMethod" value="setConnectors" />
131         "arguments">
132         
133                id="Connector" class="org.eclipse.jetty.server.ServerConnector">
134                    "Server" />
135                     
136                    "host" value="#{systemProperties['jetty.host']}" />
137                    "port" value="#{systemProperties['jetty.port']}" />
138                
139                 
142                 
153             
154         
155     
156 
157     id="configureJetty" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
158         "staticMethod" value="org.apache.activemq.web.config.JspConfigurer.configureJetty" />
159         "arguments">
160             
161                 "Server" />
162                 "secHandlerCollection" />
163             
164         
165     
166     
167     id="invokeStart" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" 
168         depends-on="configureJetty, invokeConnectors">
169         "targetObject" ref="Server" />
170         "targetMethod" value="start" />      
171     
172     
173     
174 

 

转载于:https://www.cnblogs.com/xun0523/p/10898115.html

你可能感兴趣的:(activemq无账户密码登录配置修改)