use of org.springframework.boot.actuate.endpoint.annotation.ReadOperation in project spring-cloud-netflix by spring-cloud.
the class ArchaiusEndpoint method invoke.
@ReadOperation
public Map<String, Object> invoke() {
Map<String, Object> map = new LinkedHashMap<>();
AbstractConfiguration config = ConfigurationManager.getConfigInstance();
if (config instanceof ConcurrentCompositeConfiguration) {
ConcurrentCompositeConfiguration composite = (ConcurrentCompositeConfiguration) config;
for (Configuration item : composite.getConfigurations()) {
append(map, item);
}
} else {
append(map, config);
}
return map;
}
use of org.springframework.boot.actuate.endpoint.annotation.ReadOperation in project spring-boot by spring-projects.
the class FlywayEndpoint method flywayBeans.
@ReadOperation
public ApplicationFlywayBeans flywayBeans() {
ApplicationContext target = this.context;
Map<String, ContextFlywayBeans> contextFlywayBeans = new HashMap<>();
while (target != null) {
Map<String, FlywayDescriptor> flywayBeans = new HashMap<>();
target.getBeansOfType(Flyway.class).forEach((name, flyway) -> flywayBeans.put(name, new FlywayDescriptor(flyway.info().all())));
ApplicationContext parent = target.getParent();
contextFlywayBeans.put(target.getId(), new ContextFlywayBeans(flywayBeans, (parent != null) ? parent.getId() : null));
target = parent;
}
return new ApplicationFlywayBeans(contextFlywayBeans);
}
use of org.springframework.boot.actuate.endpoint.annotation.ReadOperation in project spring-boot by spring-projects.
the class LoggersEndpoint method loggerLevels.
@ReadOperation
public LoggerLevels loggerLevels(@Selector String name) {
Assert.notNull(name, "Name must not be null");
LoggerGroup group = this.loggerGroups.get(name);
if (group != null) {
return new GroupLoggerLevels(group.getConfiguredLevel(), group.getMembers());
}
LoggerConfiguration configuration = this.loggingSystem.getLoggerConfiguration(name);
return (configuration != null) ? new SingleLoggerLevels(configuration) : null;
}
use of org.springframework.boot.actuate.endpoint.annotation.ReadOperation in project spring-boot by spring-projects.
the class ConfigurationPropertiesReportEndpointWebExtension method configurationPropertiesWithPrefix.
@ReadOperation
public WebEndpointResponse<ApplicationConfigurationProperties> configurationPropertiesWithPrefix(@Selector String prefix) {
ApplicationConfigurationProperties configurationProperties = this.delegate.configurationPropertiesWithPrefix(prefix);
boolean foundMatchingBeans = configurationProperties.getContexts().values().stream().anyMatch((context) -> !context.getBeans().isEmpty());
return (foundMatchingBeans) ? new WebEndpointResponse<>(configurationProperties, WebEndpointResponse.STATUS_OK) : new WebEndpointResponse<>(WebEndpointResponse.STATUS_NOT_FOUND);
}
use of org.springframework.boot.actuate.endpoint.annotation.ReadOperation in project spring-boot by spring-projects.
the class MappingsEndpoint method mappings.
@ReadOperation
public ApplicationMappings mappings() {
ApplicationContext target = this.context;
Map<String, ContextMappings> contextMappings = new HashMap<>();
while (target != null) {
contextMappings.put(target.getId(), mappingsForContext(target));
target = target.getParent();
}
return new ApplicationMappings(contextMappings);
}
Aggregations