Spring boot 如何使用Hawtio在spring boot中连接到嵌入式activeMQ?

Spring boot 如何使用Hawtio在spring boot中连接到嵌入式activeMQ?,spring-boot,activemq,stomp,hawtio,Spring Boot,Activemq,Stomp,Hawtio,我的spring boot应用程序包含嵌入式activeMQ,我想使用hawtio连接到web控制台,但无法连接。 我执行以下步骤: 1-in cmd“java-jar-hawtio-app-1.5.7.jar” 2-尝试连接到主机:本地主机端口:1099路径:api/jolokia 但不工作,请返回以下内容: 加载资源失败:服务器响应状态为500(本地主机:1099响应失败) Pom.xml 您需要在Spring Boot应用程序上启用Jolokia端点,并使其在应用程序外部可访问 为此,首

我的spring boot应用程序包含嵌入式activeMQ,我想使用hawtio连接到web控制台,但无法连接。 我执行以下步骤:

1-in cmd“java-jar-hawtio-app-1.5.7.jar”

2-尝试连接到主机:本地主机端口:1099路径:api/jolokia 但不工作,请返回以下内容:

加载资源失败:服务器响应状态为500(本地主机:1099响应失败)

Pom.xml


您需要在Spring Boot应用程序上启用Jolokia端点,并使其在应用程序外部可访问

为此,首先需要在pom.xml中添加
spring boot exactor

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-actuator</artifactId>
</dependency>
现在您应该可以在以下位置连接到Jolokia:尝试从hawtio控制台连接到它

仅供参考,在这里您可以找到hawtio与Spring Boot应用程序集成的工作示例:

我添加了
org.springframework.boot”
`2018-02-13;00:31:26.976 [localhost-startStop-1] INFO 
                o.s.b.w.s.ServletRegistrationBean.onStartup(190) - Mapping servlet: 'dispatcherServlet' to [/]
2018-02-13;00:31:27.016 [localhost-startStop-1] INFO 
                o.s.b.w.s.FilterRegistrationBean.configure(258) - Mapping filter: 'characterEncodingFilter' to: [/*]
2018-02-13;00:31:27.019 [localhost-startStop-1] INFO 
                o.s.b.w.s.FilterRegistrationBean.configure(258) - Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-02-13;00:31:27.021 [localhost-startStop-1] INFO 
                o.s.b.w.s.FilterRegistrationBean.configure(258) - Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-02-13;00:31:27.022 [localhost-startStop-1] INFO 
                o.s.b.w.s.FilterRegistrationBean.configure(258) - Mapping filter: 'requestContextFilter' to: [/*]
2018-02-13;00:31:28.938 [main] INFO 
                o.s.s.c.ThreadPoolTaskExecutor.initialize(165) - Initializing ExecutorService  'clientInboundChannelExecutor'
2018-02-13;00:31:28.976 [main] INFO 
                o.s.s.c.ThreadPoolTaskExecutor.initialize(165) - Initializing ExecutorService  'clientOutboundChannelExecutor'
2018-02-13;00:31:29.434 [main] INFO 
                o.s.s.c.ThreadPoolTaskScheduler.initialize(165) - Initializing ExecutorService  'messageBrokerTaskScheduler'
2018-02-13;00:31:29.567 [main] INFO 
                o.s.w.s.s.s.WebSocketHandlerMapping.registerHandler(362) - Mapped URL path [/websocket/**] onto handler of type [class org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler]
2018-02-13;00:31:29.627 [main] INFO 
                o.s.s.c.ThreadPoolTaskExecutor.initialize(165) - Initializing ExecutorService  'brokerChannelExecutor'
2018-02-13;00:31:30.895 [main] WARN 
                o.a.activemq.broker.BrokerService.checkMemorySystemUsageLimits(2146) - Memory Usage for the Broker (1024mb) is more than the maximum available for the JVM: 512 mb - resetting to 70% of maximum available: 358 mb
2018-02-13;00:31:31.096 [main] INFO 
                o.a.activemq.broker.BrokerService.doStartPersistenceAdapter(671) - Using Persistence Adapter: KahaDBPersistenceAdapter[C:\Users\anash\git\Notfication\activemq-data\localhost\KahaDB]
2018-02-13;00:31:31.111 [JMX connector] INFO 
                o.a.a.broker.jmx.ManagementContext.run(155) - JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
2018-02-13;00:31:31.721 [main] INFO 
                o.a.a.store.kahadb.MessageDatabase.read(191) - KahaDB is version 6
2018-02-13;00:31:31.747 [main] INFO 
                o.a.a.store.kahadb.MessageDatabase.recover(678) - Recovering from the journal @1:1026194
2018-02-13;00:31:31.768 [main] INFO 
                o.a.a.store.kahadb.MessageDatabase.recover(706) - Recovery replayed 253 operations from the journal in 0.037 seconds.
2018-02-13;00:31:31.965 [main] INFO 
                o.a.a.s.kahadb.plist.PListStoreImpl.doStart(371) - PListStore:[C:\Users\anash\git\Notfication\activemq-data\localhost\tmp_storage] started
2018-02-13;00:31:32.136 [main] INFO 
                o.a.activemq.broker.BrokerService.doStartBroker(734) - Apache ActiveMQ 5.14.5 (localhost, ID:SPS-Anash-49217-1518474691990-0:1) is starting
2018-02-13;00:31:32.159 [main] INFO 
                o.a.a.t.TransportServerThreadSupport.doStart(69) - Listening for connections at: stomp://127.0.0.1:61613
2018-02-13;00:31:32.160 [main] INFO 
                o.a.a.broker.TransportConnector.start(263) - Connector stomp://127.0.0.1:61613 started
2018-02-13;00:31:32.164 [main] INFO 
                o.a.activemq.broker.BrokerService.doStartBroker(761) - Apache ActiveMQ 5.14.5 (localhost, ID:SPS-Anash-49217-1518474691990-0:1) started
2018-02-13;00:31:32.165 [main] INFO 
                o.a.activemq.broker.BrokerService.doStartBroker(762) - For help or more information please see: http://activemq.apache.org
2018-02-13;00:31:32.169 [main] WARN `
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-actuator</artifactId>
</dependency>
endpoints.jolokia.sensitive = false