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
3445d093
Commit
3445d093
authored
Mar 17, 2015
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix RabbitAdmin so it actually finds the Declarables
parent
f3ced9e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
HystrixStreamAutoConfiguration.java
.../netflix/hystrix/amqp/HystrixStreamAutoConfiguration.java
+6
-1
TurbineAmqpAutoConfiguration.java
...ud/netflix/turbine/amqp/TurbineAmqpAutoConfiguration.java
+5
-0
No files found.
spring-cloud-netflix-hystrix-amqp/src/main/java/org/springframework/cloud/netflix/hystrix/amqp/HystrixStreamAutoConfiguration.java
View file @
3445d093
...
...
@@ -26,6 +26,7 @@ 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.netflix.hystrix.HystrixConstants
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.integration.annotation.IntegrationComponentScan
;
...
...
@@ -69,6 +70,9 @@ public class HystrixStreamAutoConfiguration {
@Autowired
(
required
=
false
)
private
ConnectionFactory
primaryConnectionFactory
;
@Autowired
private
ApplicationContext
context
;
@Autowired
(
required
=
false
)
private
ObjectMapper
objectMapper
;
...
...
@@ -112,7 +116,7 @@ public class HystrixStreamAutoConfiguration {
// TODO: set content type
/*
* .enrichHeaders(new ComponentConfigurer<HeaderEnricherSpec>() {
*
*
* @Override public void configure(HeaderEnricherSpec spec) {
* spec.header("content-type", "application/json", true); } })
*/
...
...
@@ -124,6 +128,7 @@ public class HystrixStreamAutoConfiguration {
if
(
this
.
hystrixConnectionFactory
!=
null
)
{
RabbitAdmin
amqpAdmin
=
new
RabbitAdmin
(
this
.
hystrixConnectionFactory
);
hystrixStreamExchange
().
setAdminsThatShouldDeclare
(
amqpAdmin
);
amqpAdmin
.
setApplicationContext
(
this
.
context
);
amqpAdmin
.
afterPropertiesSet
();
return
this
.
hystrixConnectionFactory
;
}
...
...
spring-cloud-netflix-turbine-amqp/src/main/java/org/springframework/cloud/netflix/turbine/amqp/TurbineAmqpAutoConfiguration.java
View file @
3445d093
...
...
@@ -31,6 +31,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.cloud.netflix.hystrix.HystrixConstants
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.integration.dsl.IntegrationFlow
;
...
...
@@ -60,6 +61,9 @@ import com.fasterxml.jackson.databind.ObjectMapper;
@ConditionalOnProperty
(
value
=
"turbine.amqp.enabled"
,
matchIfMissing
=
true
)
public
class
TurbineAmqpAutoConfiguration
{
@Autowired
private
ApplicationContext
context
;
@Autowired
(
required
=
false
)
@TurbineConnectionFactory
private
ConnectionFactory
turbineConnectionFactory
;
...
...
@@ -110,6 +114,7 @@ public class TurbineAmqpAutoConfiguration {
hystrixStreamExchange
().
setAdminsThatShouldDeclare
(
amqpAdmin
);
localTurbineAmqpQueueBinding
().
setAdminsThatShouldDeclare
(
amqpAdmin
);
hystrixStreamQueue
().
setAdminsThatShouldDeclare
(
amqpAdmin
);
amqpAdmin
.
setApplicationContext
(
this
.
context
);
amqpAdmin
.
afterPropertiesSet
();
return
this
.
turbineConnectionFactory
;
}
...
...
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