2.3. Spring Boot 1.x용 Fuse 콘솔에 액세스
독립 실행형 Fuse Spring Boot 1.x 배포를 위해 Fuse Console에 액세스할 수 있습니다.
절차
Fuse 애플리케이션의
pom.xml
파일에 다음 종속성을 추가합니다.<dependency> <groupId>io.hawt</groupId> <artifactId>hawtio-springboot-1</artifactId> </dependency>
Maven BOM에서 제공하므로 정확한 버전을 지정할 필요가 없습니다.
src/main/resources/application.properties
파일을 편집합니다.다음 속성을 false 로 설정합니다.
-
endpoints.jolokia.sensitive
-
endpoints.hawtio.sensitive
-
hawtio.authenticationEnabled
-
다음 속성을 true로 설정합니다.Set the following properties to true:
-
endpoints.hawtio.enabled
endpoints.jolokia.enabled
application.properties
설정은 다음 예와 유사해야 합니다.# ports server.port=8080 management.port=10001 # enable management endpoints for healthchecks and hawtio endpoints.enabled = false endpoints.hawtio.enabled = true endpoints.jolokia.enabled = true endpoints.health.enabled = true management.health.defaults.enabled=false camel.health.enabled=false camel.health.indicator.enabled=true endpoints.jolokia.sensitive=false endpoints.hawtio.sensitive=false hawtio.authenticationEnabled=false
참고기본적으로 Spring Boot에서 Fuse Console에 대한 인증은 비활성화되어 있습니다. 선택적으로 Fuse Console 배포와 관련된 코드를 작성하여 인증을 활성화할 수 있습니다. 지침에 사용할 수 있는 예는 다음과 같습니다.
https://github.com/hawtio/hawtio/tree/master/examples/springboot-authentication
-
Fuse 애플리케이션을 실행합니다.
mvn spring-boot:run
Fuse Console URL의 포트 번호를 확인하려면
src/main/resources/application.properties
파일에 설정된 값을 확인하여 management.port 값을 가져옵니다. 예를 들면 다음과 같습니다.management.port = 10001
브라우저에서 Fuse 콘솔을 열려면 nnnnn 이 management.port 속성의 값인 다음 URL 구문을 사용합니다.