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
12c7ae1e
Unverified
Commit
12c7ae1e
authored
Jul 18, 2017
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 2.0.x
parents
130dfb63
31d19fd5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
8 deletions
+23
-8
spring-cloud-netflix.adoc
docs/src/main/asciidoc/spring-cloud-netflix.adoc
+8
-0
EurekaClientConfigBean.java
...ramework/cloud/netflix/eureka/EurekaClientConfigBean.java
+2
-1
EurekaDashboardProperties.java
...loud/netflix/eureka/server/EurekaDashboardProperties.java
+13
-7
No files found.
docs/src/main/asciidoc/spring-cloud-netflix.adoc
View file @
12c7ae1e
...
...
@@ -487,6 +487,14 @@ of services rather than the hostname. Set `eureka.instance.preferIpAddress`
to `true` and when the application registers with eureka, it will use its
IP Address rather than its hostname.
[TIP]
====
If hostname can'
t
be
determined
by
Java
,
then
IP
address
is
sent
to
Eureka
.
Only
explict
way
of
setting
hostname
is
by
using
`
eureka
.
instance
.
hostname
`.
You
can
set
your
hostname
at
the
run
time
using
environment
variable
,
for
example
`
eureka
.
instance
.
hostname
=${
HOST_NAME
}`.
====
==
Circuit
Breaker
:
Hystrix
Clients
Netflix
has
created
a
library
called
https
://
github
.
com
/
Netflix
/
Hystrix
[
Hystrix
]
that
implements
the
http
://
martinfowler
.
com
/
bliki
/
CircuitBreaker
.
html
[
circuit
breaker
pattern
].
In
a
microservice
architecture
it
is
common
to
have
multiple
layers
of
service
calls
.
...
...
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java
View file @
12c7ae1e
...
...
@@ -17,13 +17,13 @@
package
org
.
springframework
.
cloud
.
netflix
.
eureka
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.NestedConfigurationProperty
;
import
org.springframework.core.env.PropertyResolver
;
import
org.springframework.util.StringUtils
;
...
...
@@ -59,6 +59,7 @@ public class EurekaClientConfigBean implements EurekaClientConfig {
*/
private
boolean
enabled
=
true
;
@NestedConfigurationProperty
private
EurekaTransportConfig
transport
=
new
CloudEurekaTransportConfig
();
/**
...
...
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaDashboardProperties.java
View file @
12c7ae1e
...
...
@@ -16,11 +16,10 @@
package
org
.
springframework
.
cloud
.
netflix
.
eureka
.
server
;
import
org.apache.commons.lang.builder.EqualsBuilder
;
import
org.apache.commons.lang.builder.HashCodeBuilder
;
import
org.apache.commons.lang.builder.ToStringBuilder
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
java.util.Objects
;
/**
* Configuration properties for the Eureka dashboard (UI).
*
...
...
@@ -57,17 +56,24 @@ public class EurekaDashboardProperties {
@Override
public
boolean
equals
(
Object
o
)
{
return
EqualsBuilder
.
reflectionEquals
(
this
,
o
);
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
EurekaDashboardProperties
that
=
(
EurekaDashboardProperties
)
o
;
return
enabled
==
that
.
enabled
&&
Objects
.
equals
(
path
,
that
.
path
);
}
@Override
public
int
hashCode
()
{
return
HashCodeBuilder
.
reflectionHashCode
(
this
);
return
Objects
.
hash
(
path
,
enabled
);
}
@Override
public
String
toString
()
{
return
ToStringBuilder
.
reflectionToString
(
this
);
final
StringBuffer
sb
=
new
StringBuffer
(
"EurekaDashboardProperties{"
);
sb
.
append
(
"path='"
).
append
(
path
).
append
(
'\''
);
sb
.
append
(
", enabled="
).
append
(
enabled
);
sb
.
append
(
'}'
);
return
sb
.
toString
();
}
}
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