001/* 002 * Copyright 2012-2018 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.boot.actuate.autoconfigure.health; 018 019import java.util.HashSet; 020import java.util.Set; 021 022import org.springframework.boot.actuate.health.HealthEndpoint; 023import org.springframework.boot.actuate.health.ShowDetails; 024import org.springframework.boot.context.properties.ConfigurationProperties; 025 026/** 027 * Configuration properties for {@link HealthEndpoint}. 028 * 029 * @author Phillip Webb 030 */ 031@ConfigurationProperties("management.endpoint.health") 032public class HealthEndpointProperties { 033 034 /** 035 * When to show full health details. 036 */ 037 private ShowDetails showDetails = ShowDetails.NEVER; 038 039 /** 040 * Roles used to determine whether or not a user is authorized to be shown details. 041 * When empty, all authenticated users are authorized. 042 */ 043 private Set<String> roles = new HashSet<>(); 044 045 public ShowDetails getShowDetails() { 046 return this.showDetails; 047 } 048 049 public void setShowDetails(ShowDetails showDetails) { 050 this.showDetails = showDetails; 051 } 052 053 public Set<String> getRoles() { 054 return this.roles; 055 } 056 057 public void setRoles(Set<String> roles) { 058 this.roles = roles; 059 } 060 061}