2.4. 运行 Quarkus 应用程序
您可以按照以下步骤将 Red Hat buuld of HawtIO 附加到 Quarkus 应用程序。
流程
将
io.hawt:hawtio-quarkus和支持的 Camel Quarkus 扩展添加到pom.xml中的依赖项:<dependencyManagement> <dependencies> <dependency> <groupId>io.hawt</groupId> <artifactId>hawtio-bom</artifactId> <version>4.2.0.redhat-00034</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> <!-- ... other BOMs or dependencies ... --> </dependencyManagement> <dependencies> <dependency> <groupId>io.hawt</groupId> <artifactId>hawtio-quarkus</artifactId> </dependency> <!-- Mandatory for enabling Camel management via JMX / Red Hat buuld of HawtIO --> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-management</artifactId> </dependency> <!-- (Optional) Required for Red Hat buuld of HawtIO Camel route diagram tab --> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-jaxb</artifactId> </dependency> <!-- ... other dependencies ... --> </dependencies>通过将以下配置添加到
application.properties来禁用身份验证:quarkus.hawtio.authenticationEnabled = false- 您还可以配置身份验证。请参阅"Quarkus 身份验证机制"。
在开发模式下运行带有 Quarkus 应用程序的 Red Hat buuld of HawtIO,如下所示:
mvn compile quarkus:dev- 打开 http://localhost:8080/hawtio/ 以查看 Red Hat Buld of HawtIO 控制台。