검색

2.2. Spring Boot 2.x용 Fuse 콘솔에 액세스

download PDF

독립 실행형 Fuse Spring Boot 2.x 배포를 위해 Fuse Console에 액세스할 수 있습니다.

절차

  1. Fuse 애플리케이션의 pom.xml 파일에 다음 종속성을 추가합니다.

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

    Maven BOM에서 제공하므로 정확한 버전을 지정할 필요가 없습니다.

  2. src/main/resources/application.properties 파일을 편집합니다.

    1. 다음 속성을 설정합니다.

      • management.endpoints.web.exposure.include=hawtio,jolokia
      • hawtio.authenticationEnabled=false
      • management.endpoint.hawtio.enabled=true
      • management.endpoint.jolokia.enabled=true
    2. 필요한 경우 management.endpoints.web.base-path 속성을 설정합니다.

      기본적으로 Spring Boot 2.x의 URL에는 관리 끝점의 컨텍스트 경로(/actuator)가 포함됩니다. 예를 들면 다음과 같습니다.

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

      이 기본 URL을 변경하려면 예를 들어 기본 Spring Boot 1.x URL(http://localhost:10001/hawtio)과 동일한 형식을 지정하려면 다음과 같이 management.endpoints.web.base-path 속성을 설정합니다.

      management.endpoints.web.base-path=/

      application.properties 설정은 다음 예와 유사해야 합니다.

      # 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=/
      참고

      기본적으로 Spring Boot에서 Fuse Console에 대한 인증은 비활성화되어 있습니다. 선택적으로 Fuse Console 배포와 관련된 코드를 작성하여 인증을 활성화할 수 있습니다. 지침에 사용할 수 있는 예는 다음과 같습니다.

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

  3. Fuse 애플리케이션을 실행합니다.

    mvn spring-boot:run
  4. Fuse Console URL의 포트 번호를 확인하려면 src/main/resources/application.properties 파일에 설정된 값을 확인하여 management.server.port 값을 가져옵니다. 예를 들면 다음과 같습니다.

    management.server.port   = 10001
  5. 브라우저에서 Fuse 콘솔을 열려면 nnnnnmanagement.server.port 속성의 값인 다음 URL 구문을 사용합니다.

    http://localhost:nnnnn/actuator/hawtio

    예를 들어 management.server.port 속성 값이 10001 이고 management.endpoints.web.base-path 속성을 설정하지 않은 경우 URL은 다음과 같습니다.

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

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.