|
|
|
@ -16,14 +16,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
package org.springframework.boot.actuate.endpoint; |
|
|
|
package org.springframework.boot.actuate.endpoint; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.actuate.info.Info; |
|
|
|
import org.springframework.boot.actuate.info.Info; |
|
|
|
import org.springframework.boot.actuate.info.InfoContributor; |
|
|
|
import org.springframework.boot.actuate.info.InfoContributor; |
|
|
|
import org.springframework.boot.actuate.info.MapInfoContributor; |
|
|
|
|
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
|
|
import org.springframework.util.Assert; |
|
|
|
import org.springframework.util.Assert; |
|
|
|
|
|
|
|
|
|
|
|
@ -49,14 +46,6 @@ public class InfoEndpoint extends AbstractEndpoint<Map<String, Object>> { |
|
|
|
this.infoContributors = infoContributors; |
|
|
|
this.infoContributors = infoContributors; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static List<InfoContributor> createContributors(Map<String, Object> info, |
|
|
|
|
|
|
|
InfoContributor[] infoContributors) { |
|
|
|
|
|
|
|
List<InfoContributor> result = new ArrayList<InfoContributor>( |
|
|
|
|
|
|
|
Arrays.asList(infoContributors)); |
|
|
|
|
|
|
|
result.add(0, new MapInfoContributor(info)); |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Map<String, Object> invoke() { |
|
|
|
public Map<String, Object> invoke() { |
|
|
|
Info.Builder builder = new Info.Builder(); |
|
|
|
Info.Builder builder = new Info.Builder(); |
|
|
|
|