org.springframework.cloud.bus.BusProperties Java Examples
The following examples show how to use
org.springframework.cloud.bus.BusProperties.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GatewayConfiguration.java From open-cloud with MIT License | 5 votes |
/** * 自定义网关监控端点 * * @param context * @param bus * @return */ @Bean @ConditionalOnEnabledEndpoint @ConditionalOnClass({Endpoint.class}) public ApiEndpoint apiEndpoint(ApplicationContext context, BusProperties bus) { ApiEndpoint endpoint = new ApiEndpoint(context, bus.getId()); log.info("ApiEndpoint [{}]", endpoint); return endpoint; }
Example #2
Source File: ApiConfiguration.java From open-cloud with MIT License | 5 votes |
/** * 网关bus端点 * * @param context * @param bus * @return */ @Bean @ConditionalOnEnabledEndpoint @ConditionalOnClass({Endpoint.class}) public ApiEndpoint apiEndpoint(ApplicationContext context, BusProperties bus) { ApiEndpoint endpoint = new ApiEndpoint(context, bus.getId()); log.info("ApiEndpoint [{}]", endpoint); return endpoint; }
Example #3
Source File: AutoConfiguration.java From open-cloud with MIT License | 5 votes |
/** * 自定义Oauth2请求类 * * @param openCommonProperties * @return */ @Bean @ConditionalOnMissingBean(OpenRestTemplate.class) public OpenRestTemplate openRestTemplate(OpenCommonProperties openCommonProperties, BusProperties busProperties, ApplicationEventPublisher publisher) { OpenRestTemplate restTemplate = new OpenRestTemplate(openCommonProperties, busProperties, publisher); //设置自定义ErrorHandler restTemplate.setErrorHandler(new OpenRestResponseErrorHandler()); log.info("OpenRestTemplate [{}]", restTemplate); return restTemplate; }
Example #4
Source File: OpenRestTemplate.java From open-cloud with MIT License | 4 votes |
public OpenRestTemplate(OpenCommonProperties common, BusProperties busProperties, ApplicationEventPublisher publisher) { this.common = common; this.publisher = publisher; this.busProperties = busProperties; }
Example #5
Source File: EnvironmentMonitorAutoConfiguration.java From spring-cloud-config with Apache License 2.0 | 4 votes |
@Bean public PropertyPathEndpoint propertyPathEndpoint(BusProperties busProperties) { return new PropertyPathEndpoint( new CompositePropertyPathNotificationExtractor(this.extractors), busProperties.getId()); }
Example #6
Source File: EnvironmentMonitorAutoConfigurationTests.java From spring-cloud-config with Apache License 2.0 | 4 votes |
@Bean public BusProperties busProperties() { return new BusProperties(); }