Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 2. Accessing the Fuse Console for Spring Boot 2.x

download PDF

You can access the Fuse Console for a standalone Fuse Spring Boot 2.x distribution.

Procedure

  1. Add the following dependency to your Fuse application’s pom.xml file:

    <dependency>
      <groupId>io.hawt</groupId>
      <artifactId>hawtio-springboot</artifactId>
    </dependency>

    Note that you do not need to specify the exact version because it is provided by the Maven BOM.

  2. Edit the src/main/resources/application.properties file:

    1. Set the following properties:

      • management.endpoints.web.exposure.include=hawtio,jolokia
      • hawtio.authenticationEnabled=false
      • management.endpoint.hawtio.enabled=true
      • management.endpoint.jolokia.enabled=true
    2. Optionally, set the management.endpoints.web.base-path property.

      By default for Spring Boot 2.x, the Fuse Console’s URL includes the context path (/actuator) of the management endpoints. For example:

      http://localhost:10001/actuator/hawtio/index.html

      To change this default URL, for example to specify http://localhost:10001/hawtio, set the management.endpoints.web.base-path property as shown here:

      management.endpoints.web.base-path=/

      Your application.properties settings should look similar to the following example:

      # ports
      
      server.port=8080
      
      management.server.port=10001
      
      # enable management endpoints for healthchecks and hawtio
      
      management.endpoints.enabled-by-default = false
      
      management.endpoint.hawtio.enabled = true
      
      management.endpoint.jolokia.enabled = true
      
      management.endpoints.health.enabled = true
      
      management.health.defaults.enabled=false
      
      camel.health.enabled=false
      
      camel.health.indicator.enabled=true
      
      management.endpoints.web.exposure.include=hawtio,jolokia
      
      hawtio.authenticationEnabled=false
      
      # change the URL so that it does not include the actuator folder
      
      management.endpoints.web.base-path=/
      Note

      By default, authentication for the Fuse Console on Spring Boot is disabled. Optionally, you can enable authentication by writing code specific to your Fuse Console distribution. Here is an example that you can use for guidance:

      https://github.com/hawtio/hawtio/tree/master/examples/springboot-authentication

  3. Run the Fuse application:

    mvn spring-boot:run
  4. To determine the port number for the Fuse Console URL, obtain the management.server.port value by looking at the value set in the src/main/resources/application.properties file. For example:

    management.server.port   = 10001
  5. To open the Fuse Console in a browser, use the following URL syntax where nnnnn is the value of the management.server.port property:

    http://localhost:nnnnn/actuator/hawtio

    For example, if the management.server.port property value is 10001 and you have not set the management.endpoints.web.base-path property then the URL is:

    http://localhost:10001/actuator/hawtio/index.html

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.