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
c1704235
Commit
c1704235
authored
Feb 22, 2016
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
polish
parent
572220ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
EurekaSampleApplication.java
.../cloud/netflix/eureka/sample/EurekaSampleApplication.java
+6
-1
SidecarApplication.java
...ngframework/cloud/netflix/sidecar/SidecarApplication.java
+0
-9
No files found.
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/sample/EurekaSampleApplication.java
View file @
c1704235
...
...
@@ -16,9 +16,11 @@
package
org
.
springframework
.
cloud
.
netflix
.
eureka
.
sample
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.actuate.metrics.repository.InMemoryMetricRepository
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.cloud.client.discovery.DiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
...
...
@@ -36,6 +38,9 @@ import com.netflix.appinfo.InstanceInfo;
@EnableEurekaClient
public
class
EurekaSampleApplication
{
@Autowired
DiscoveryClient
discoveryClient
;
@Bean
public
InMemoryMetricRepository
inMemoryMetricRepository
()
{
return
new
InMemoryMetricRepository
();
...
...
@@ -54,7 +59,7 @@ public class EurekaSampleApplication {
@RequestMapping
(
"/"
)
public
String
home
()
{
return
"Hello world
"
;
return
"Hello world
"
+
discoveryClient
.
getLocalServiceInstance
().
getUri
()
;
}
public
static
void
main
(
String
[]
args
)
{
...
...
spring-cloud-netflix-sidecar/src/test/java/org/springframework/cloud/netflix/sidecar/SidecarApplication.java
View file @
c1704235
...
...
@@ -17,23 +17,14 @@
package
org
.
springframework
.
cloud
.
netflix
.
sidecar
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.actuate.metrics.repository.InMemoryMetricRepository
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.web.bind.annotation.RestController
;
@SpringBootApplication
@EnableSidecar
@EnableDiscoveryClient
@RestController
public
class
SidecarApplication
{
@Bean
public
InMemoryMetricRepository
inMemoryMetricRepository
()
{
return
new
InMemoryMetricRepository
();
}
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
SidecarApplication
.
class
,
args
);
}
...
...
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