Skip to content

Commit 5d92c78

Browse files
committed
zipkin
1 parent 06a753d commit 5d92c78

File tree

18 files changed

+183
-22
lines changed

18 files changed

+183
-22
lines changed

config-server/.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**
5+
!**/src/test/**
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
30+
### VS Code ###
31+
.vscode/

config-server/pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<artifactId>config-server</artifactId>
6+
<parent>
7+
<groupId>g.t</groupId>
8+
<artifactId>microservice-test</artifactId>
9+
<version>0.0.1-SNAPSHOT</version>
10+
</parent>
11+
12+
<dependencies>
13+
<dependency>
14+
<groupId>org.springframework.cloud</groupId>
15+
<artifactId>spring-cloud-config-server</artifactId>
16+
</dependency>
17+
18+
</dependencies>
19+
20+
</project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package gt.config;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.cloud.config.server.EnableConfigServer;
6+
7+
@SpringBootApplication
8+
@EnableConfigServer
9+
public class ConfigApplication {
10+
11+
public static void main(String[] args) {
12+
SpringApplication.run(ConfigApplication.class, args);
13+
}
14+
15+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
server:
4+
port: 8888
5+
6+
spring:
7+
cloud:
8+
config:
9+
server:
10+
native:
11+
search-locations: file:///${user.home}/IdeaProjects/spring-boot-microservice-example-java/configs/local
12+
profiles:
13+
active: native
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
spring:
2+
application:
3+
name: config-server

configs/.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**
5+
!**/src/test/**
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
30+
### VS Code ###
31+
.vscode/

gateway-app/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
<groupId>org.springframework.cloud</groupId>
2525
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
2626
</dependency>
27+
<dependency>
28+
<groupId>org.springframework.cloud</groupId>
29+
<artifactId>spring-cloud-starter-zipkin</artifactId>
30+
</dependency>
2731
</dependencies>
2832

2933
</project>

gateway-app/src/main/resources/application.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
spring:
22
application:
33
name: gateway-app
4-
4+
zipkin:
5+
baseUrl: http://localhost:9411
56
server:
67
port: 8080
78

greeting-service/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
<groupId>org.springframework.cloud</groupId>
2121
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
2222
</dependency>
23+
<dependency>
24+
<groupId>org.springframework.cloud</groupId>
25+
<artifactId>spring-cloud-starter-zipkin</artifactId>
26+
</dependency>
2327
</dependencies>
2428

2529
</project>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
server:
22
port: 0
3+
zipkin:
4+
baseUrl: http://localhost:9411

0 commit comments

Comments
 (0)