use of org.springframework.context.annotation.Bean in project spring-boot-admin by codecentric.
the class AdminServerCoreConfiguration method statusUpdater.
@Bean
@ConditionalOnMissingBean
public StatusUpdater statusUpdater(ApplicationStore applicationStore, ApplicationOperations applicationOperations) {
StatusUpdater statusUpdater = new StatusUpdater(applicationStore, applicationOperations);
statusUpdater.setStatusLifetime(adminServerProperties.getMonitor().getStatusLifetime());
return statusUpdater;
}
use of org.springframework.context.annotation.Bean in project spring-boot-admin by codecentric.
the class AdminServerWebConfiguration method prefixHandlerMapping.
@Bean
public PrefixHandlerMapping prefixHandlerMapping() {
Map<String, Object> beans = applicationContext.getBeansWithAnnotation(AdminController.class);
PrefixHandlerMapping prefixHandlerMapping = new PrefixHandlerMapping(beans.values().toArray(new Object[beans.size()]));
prefixHandlerMapping.setPrefix(adminServerProperties.getContextPath());
return prefixHandlerMapping;
}
use of org.springframework.context.annotation.Bean in project spring-boot-admin by codecentric.
the class DiscoveryClientConfiguration method applicationDiscoveryListener.
@Bean
@ConditionalOnMissingBean
@ConfigurationProperties(prefix = "spring.boot.admin.discovery")
public ApplicationDiscoveryListener applicationDiscoveryListener(ServiceInstanceConverter serviceInstanceConverter) {
ApplicationDiscoveryListener listener = new ApplicationDiscoveryListener(discoveryClient, registry);
listener.setConverter(serviceInstanceConverter);
return listener;
}
use of org.springframework.context.annotation.Bean in project spring-boot-admin by codecentric.
the class RevereseZuulProxyConfiguration method proxyRequestHelper.
@Bean
public ProxyRequestHelper proxyRequestHelper() {
TraceProxyRequestHelper helper = new TraceProxyRequestHelper();
if (this.traces != null) {
helper.setTraces(this.traces);
}
helper.setIgnoredHeaders(this.zuulProperties.getIgnoredHeaders());
helper.setTraceRequestBody(this.zuulProperties.isTraceRequestBody());
return helper;
}
use of org.springframework.context.annotation.Bean in project spring-boot-admin by codecentric.
the class SpringBootAdminClientAutoConfiguration method registrationListener.
@Bean
@ConditionalOnMissingBean
public RegistrationApplicationListener registrationListener(AdminProperties admin, ApplicationRegistrator registrator) {
RegistrationApplicationListener listener = new RegistrationApplicationListener(registrator, registrationTaskScheduler());
listener.setAutoRegister(admin.isAutoRegistration());
listener.setAutoDeregister(admin.isAutoDeregistration());
listener.setRegisterPeriod(admin.getPeriod());
return listener;
}
Aggregations