Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-cloud-netflix
Commits
7cf0fa48
Commit
7cf0fa48
authored
Sep 25, 2015
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add support for HasFeatures
parent
0a2d1703
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
89 additions
and
0 deletions
+89
-0
EurekaClientAutoConfiguration.java
...k/cloud/netflix/eureka/EurekaClientAutoConfiguration.java
+6
-0
FeignAutoConfiguration.java
...framework/cloud/netflix/feign/FeignAutoConfiguration.java
+6
-0
HystrixCircuitBreakerConfiguration.java
...d/netflix/hystrix/HystrixCircuitBreakerConfiguration.java
+11
-0
RibbonAutoConfiguration.java
...amework/cloud/netflix/ribbon/RibbonAutoConfiguration.java
+7
-0
RxJavaAutoConfiguration.java
...ngframework/cloud/netflix/rx/RxJavaAutoConfiguration.java
+6
-0
ZuulConfiguration.java
...springframework/cloud/netflix/zuul/ZuulConfiguration.java
+6
-0
ZuulProxyConfiguration.java
...gframework/cloud/netflix/zuul/ZuulProxyConfiguration.java
+6
-0
EurekaServerConfiguration.java
...loud/netflix/eureka/server/EurekaServerConfiguration.java
+6
-0
HystrixDashboardConfiguration.java
...flix/hystrix/dashboard/HystrixDashboardConfiguration.java
+6
-0
HystrixStreamAutoConfiguration.java
...etflix/hystrix/stream/HystrixStreamAutoConfiguration.java
+6
-0
SidecarConfiguration.java
...framework/cloud/netflix/sidecar/SidecarConfiguration.java
+6
-0
pom.xml
spring-cloud-netflix-turbine-stream/pom.xml
+5
-0
TurbineStreamConfiguration.java
...ud/netflix/turbine/stream/TurbineStreamConfiguration.java
+6
-0
TurbineConfiguration.java
...framework/cloud/netflix/turbine/TurbineConfiguration.java
+6
-0
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration.java
View file @
7cf0fa48
...
...
@@ -41,6 +41,7 @@ import org.springframework.boot.autoconfigure.condition.SearchStrategy;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cloud.autoconfigure.RefreshAutoConfiguration
;
import
org.springframework.cloud.client.CommonsClientAutoConfiguration
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.cloud.client.discovery.DiscoveryClient
;
import
org.springframework.cloud.client.discovery.noop.NoopDiscoveryClientAutoConfiguration
;
import
org.springframework.cloud.context.scope.refresh.RefreshScope
;
...
...
@@ -75,6 +76,11 @@ public class EurekaClientAutoConfiguration {
ConfigurableEnvironment
env
;
@Bean
public
HasFeatures
eurekaFeature
()
{
return
HasFeatures
.
namedFeature
(
"Eureka Client"
,
EurekaClient
.
class
);
}
@Bean
@ConditionalOnMissingBean
(
value
=
EurekaClientConfig
.
class
,
search
=
SearchStrategy
.
CURRENT
)
public
EurekaClientConfigBean
eurekaClientConfigBean
()
{
return
new
EurekaClientConfigBean
();
...
...
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignAutoConfiguration.java
View file @
7cf0fa48
...
...
@@ -18,7 +18,9 @@ package org.springframework.cloud.netflix.feign;
import
org.springframework.boot.autoconfigure.AutoConfigureAfter
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.cloud.netflix.archaius.ArchaiusAutoConfiguration
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Import
;
...
...
@@ -34,4 +36,8 @@ import feign.Feign;
@Import
(
FeignClientsConfiguration
.
class
)
public
class
FeignAutoConfiguration
{
@Bean
public
HasFeatures
feignFeature
()
{
return
HasFeatures
.
namedFeature
(
"Feign"
,
Feign
.
class
);
}
}
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/hystrix/HystrixCircuitBreakerConfiguration.java
View file @
7cf0fa48
...
...
@@ -32,6 +32,8 @@ import org.springframework.boot.actuate.metrics.GaugeService;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.cloud.client.actuator.NamedFeature
;
import
org.springframework.context.SmartLifecycle
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
...
...
@@ -61,6 +63,11 @@ public class HystrixCircuitBreakerConfiguration {
return
new
HystrixShutdownHook
();
}
@Bean
public
HasFeatures
hystrixFeature
()
{
return
HasFeatures
.
namedFeatures
(
new
NamedFeature
(
"Hystrix"
,
HystrixCommandAspect
.
class
));
}
@Configuration
@ConditionalOnProperty
(
value
=
"hystrix.stream.endpoint.enabled"
,
matchIfMissing
=
true
)
@ConditionalOnWebApplication
...
...
@@ -72,6 +79,10 @@ public class HystrixCircuitBreakerConfiguration {
return
new
HystrixStreamEndpoint
();
}
@Bean
public
HasFeatures
hystrixFeature
()
{
return
HasFeatures
.
namedFeature
(
"Hystrix Stream Servlet"
,
HystrixStreamEndpoint
.
class
);
}
}
@Configuration
...
...
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/RibbonAutoConfiguration.java
View file @
7cf0fa48
...
...
@@ -19,11 +19,13 @@ package org.springframework.cloud.netflix.ribbon;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.netflix.ribbon.Ribbon
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.AutoConfigureAfter
;
import
org.springframework.boot.autoconfigure.AutoConfigureBefore
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancerClient
;
import
org.springframework.cloud.client.loadbalancer.RestTemplateCustomizer
;
...
...
@@ -52,6 +54,11 @@ public class RibbonAutoConfiguration {
private
List
<
RibbonClientSpecification
>
configurations
=
new
ArrayList
<>();
@Bean
public
HasFeatures
ribbonFeature
()
{
return
HasFeatures
.
namedFeature
(
"Ribbon"
,
Ribbon
.
class
);
}
@Bean
public
SpringClientFactory
springClientFactory
()
{
SpringClientFactory
factory
=
new
SpringClientFactory
();
factory
.
setConfigurations
(
this
.
configurations
);
...
...
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/rx/RxJavaAutoConfiguration.java
View file @
7cf0fa48
...
...
@@ -20,6 +20,7 @@ import java.util.List;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.method.support.AsyncHandlerMethodReturnValueHandler
;
...
...
@@ -53,5 +54,10 @@ public class RxJavaAutoConfiguration {
}
};
}
@Bean
public
HasFeatures
rxFeature
()
{
return
HasFeatures
.
namedFeature
(
"MVC Observable"
,
Observable
.
class
);
}
}
}
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/ZuulConfiguration.java
View file @
7cf0fa48
...
...
@@ -23,6 +23,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import
org.springframework.boot.autoconfigure.web.ErrorController
;
import
org.springframework.boot.context.embedded.ServletRegistrationBean
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent
;
import
org.springframework.cloud.netflix.zuul.filters.RouteLocator
;
import
org.springframework.cloud.netflix.zuul.filters.SimpleRouteLocator
;
...
...
@@ -59,6 +60,11 @@ public class ZuulConfiguration {
private
ErrorController
errorController
;
@Bean
public
HasFeatures
zuulFeature
()
{
return
HasFeatures
.
namedFeature
(
"Zuul (Simple)"
,
ZuulConfiguration
.
class
);
}
@Bean
public
RouteLocator
routeLocator
()
{
return
new
SimpleRouteLocator
(
this
.
zuulProperties
);
}
...
...
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/ZuulProxyConfiguration.java
View file @
7cf0fa48
...
...
@@ -22,6 +22,7 @@ import org.springframework.boot.actuate.trace.TraceRepository;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.web.ServerProperties
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.cloud.client.discovery.DiscoveryClient
;
import
org.springframework.cloud.client.discovery.event.HeartbeatEvent
;
import
org.springframework.cloud.client.discovery.event.HeartbeatMonitor
;
...
...
@@ -65,6 +66,11 @@ public class ZuulProxyConfiguration extends ZuulConfiguration {
@Autowired
private
ServerProperties
server
;
@Override
public
HasFeatures
zuulFeature
()
{
return
HasFeatures
.
namedFeature
(
"Zuul (Discovery)"
,
ZuulProxyConfiguration
.
class
);
}
@Bean
@Override
public
ProxyRouteLocator
routeLocator
()
{
...
...
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerConfiguration.java
View file @
7cf0fa48
...
...
@@ -32,6 +32,7 @@ import org.springframework.beans.factory.config.BeanDefinition;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.boot.context.embedded.FilterRegistrationBean
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EurekaServerConfigBean
;
import
org.springframework.context.annotation.Bean
;
...
...
@@ -68,6 +69,11 @@ public class EurekaServerConfiguration extends WebMvcConfigurerAdapter {
private
ApplicationInfoManager
applicationInfoManager
;
@Bean
public
HasFeatures
eurekaServerFeature
()
{
return
HasFeatures
.
namedFeature
(
"Eureka Server"
,
EurekaServerConfiguration
.
class
);
}
@Bean
@ConditionalOnProperty
(
prefix
=
"eureka.dashboard"
,
name
=
"enabled"
,
matchIfMissing
=
true
)
public
EurekaController
eurekaController
()
{
return
new
EurekaController
(
applicationInfoManager
);
...
...
spring-cloud-netflix-hystrix-dashboard/src/main/java/org/springframework/cloud/netflix/hystrix/dashboard/HystrixDashboardConfiguration.java
View file @
7cf0fa48
...
...
@@ -42,6 +42,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration
;
import
org.springframework.boot.context.embedded.ServletRegistrationBean
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.http.HttpHeaders
;
...
...
@@ -64,6 +65,11 @@ public class HystrixDashboardConfiguration {
@Autowired
private
HystrixDashboardProperties
dashboardProperties
;
@Bean
public
HasFeatures
hystrixDashboardFeature
()
{
return
HasFeatures
.
namedFeature
(
"Hystrix Dashboard"
,
HystrixDashboardConfiguration
.
class
);
}
/**
* Overrides Spring Boot's {@link FreeMarkerAutoConfiguration} to prefer using a
* {@link SpringTemplateLoader} instead of the file system. This corrects an issue
...
...
spring-cloud-netflix-hystrix-stream/src/main/java/org/springframework/cloud/netflix/hystrix/stream/HystrixStreamAutoConfiguration.java
View file @
7cf0fa48
...
...
@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.cloud.stream.annotation.EnableBinding
;
import
org.springframework.cloud.stream.config.BindingProperties
;
import
org.springframework.cloud.stream.config.ChannelBindingServiceProperties
;
...
...
@@ -61,6 +62,11 @@ public class HystrixStreamAutoConfiguration {
@Autowired
private
HystrixStreamProperties
properties
;
@Bean
public
HasFeatures
hystrixStreamQueueFeature
()
{
return
HasFeatures
.
namedFeature
(
"Hystrix Stream (Queue)"
,
HystrixStreamAutoConfiguration
.
class
);
}
@PostConstruct
public
void
init
()
{
BindingProperties
outputBinding
=
this
.
bindings
.
getBindings
().
get
(
HystrixStreamClient
.
OUTPUT
);
...
...
spring-cloud-netflix-sidecar/src/main/java/org/springframework/cloud/netflix/sidecar/SidecarConfiguration.java
View file @
7cf0fa48
...
...
@@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
...
...
@@ -37,6 +38,11 @@ import com.netflix.discovery.EurekaClientConfig;
public
class
SidecarConfiguration
{
@Bean
public
HasFeatures
Feature
()
{
return
HasFeatures
.
namedFeature
(
"Netflix Sidecar"
,
SidecarConfiguration
.
class
);
}
@Bean
public
SidecarProperties
sidecarProperties
()
{
return
new
SidecarProperties
();
}
...
...
spring-cloud-netflix-turbine-stream/pom.xml
View file @
7cf0fa48
...
...
@@ -54,6 +54,11 @@
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-commons
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.integration
</groupId>
<artifactId>
spring-integration-core
</artifactId>
</dependency>
...
...
spring-cloud-netflix-turbine-stream/src/main/java/org/springframework/cloud/netflix/turbine/stream/TurbineStreamConfiguration.java
View file @
7cf0fa48
...
...
@@ -30,6 +30,7 @@ import lombok.extern.apachecommons.CommonsLog;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.context.SmartLifecycle
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
...
...
@@ -60,6 +61,11 @@ public class TurbineStreamConfiguration implements SmartLifecycle {
private
int
turbinePort
;
@Bean
public
HasFeatures
Feature
()
{
return
HasFeatures
.
namedFeature
(
"Turbine (Stream)"
,
TurbineStreamProperties
.
class
);
}
@Bean
public
PublishSubject
<
Map
<
String
,
Object
>>
hystrixSubject
()
{
return
PublishSubject
.
create
();
}
...
...
spring-cloud-netflix-turbine/src/main/java/org/springframework/cloud/netflix/turbine/TurbineConfiguration.java
View file @
7cf0fa48
...
...
@@ -20,6 +20,7 @@ import com.netflix.discovery.EurekaClient;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.embedded.ServletRegistrationBean
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.context.SmartLifecycle
;
import
org.springframework.context.annotation.Bean
;
...
...
@@ -43,6 +44,11 @@ public class TurbineConfiguration implements SmartLifecycle, Ordered {
private
EurekaClient
eurekaClient
;
@Bean
public
HasFeatures
Feature
()
{
return
HasFeatures
.
namedFeature
(
"Turbine (HTTP)"
,
TurbineConfiguration
.
class
);
}
@Bean
public
ServletRegistrationBean
turbineStreamServlet
()
{
return
new
ServletRegistrationBean
(
new
TurbineStreamServlet
(),
"/turbine.stream"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment