Skip to content

Commit 8c24f60

Browse files
committed
fixed a few things
1 parent cbb700a commit 8c24f60

31 files changed

+811
-533
lines changed

examples-java/guestbook-service/Dockerfile

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 91 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,103 @@
11
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4-
<modelVersion>4.0.0</modelVersion>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
56

6-
<groupId>com.example.guestbook</groupId>
7-
<artifactId>guestbook-service</artifactId>
8-
<version>0.0.1-SNAPSHOT</version>
9-
<packaging>jar</packaging>
7+
<groupId>com.example.guestbook</groupId>
8+
<artifactId>guestbook-service</artifactId>
9+
<version>0.0.1-SNAPSHOT</version>
10+
<packaging>jar</packaging>
1011

11-
<name>guestbook-service</name>
12-
<description>Demo project for Spring Boot</description>
12+
<name>guestbook-service</name>
13+
<description>Demo project for Spring Boot</description>
1314

14-
<parent>
15-
<groupId>com.example.guestbook</groupId>
16-
<artifactId>guestbook-example</artifactId>
17-
<version>0.0.1-SNAPSHOT</version>
18-
<relativePath>../pom.xml</relativePath>
19-
</parent>
15+
<parent>
16+
<groupId>com.example.guestbook</groupId>
17+
<artifactId>guestbook-example</artifactId>
18+
<version>0.0.1-SNAPSHOT</version>
19+
<relativePath>../pom.xml</relativePath>
20+
</parent>
2021

21-
<properties>
22-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24-
<java.version>1.8</java.version>
25-
<spring-cloud.version>Dalston.RELEASE</spring-cloud.version>
26-
</properties>
22+
<properties>
23+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
24+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
25+
<java.version>1.8</java.version>
26+
</properties>
2727

28-
<dependencies>
29-
<dependency>
30-
<groupId>org.springframework.boot</groupId>
31-
<artifactId>spring-boot-starter-actuator</artifactId>
32-
</dependency>
33-
<dependency>
34-
<groupId>org.springframework.cloud</groupId>
35-
<artifactId>spring-cloud-starter-sleuth</artifactId>
36-
</dependency>
37-
<dependency>
38-
<groupId>org.springframework.cloud</groupId>
39-
<artifactId>spring-cloud-starter-zipkin</artifactId>
40-
</dependency>
41-
<dependency>
42-
<groupId>org.springframework.boot</groupId>
43-
<artifactId>spring-boot-starter-data-jpa</artifactId>
44-
</dependency>
45-
<dependency>
46-
<groupId>org.springframework.boot</groupId>
47-
<artifactId>spring-boot-starter-data-rest</artifactId>
48-
</dependency>
49-
<dependency>
50-
<groupId>mysql</groupId>
51-
<artifactId>mysql-connector-java</artifactId>
52-
</dependency>
28+
<dependencies>
29+
<dependency>
30+
<groupId>org.springframework.boot</groupId>
31+
<artifactId>spring-boot-starter-actuator</artifactId>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.springframework.cloud</groupId>
35+
<artifactId>spring-cloud-gcp-starter-trace</artifactId>
36+
</dependency>
37+
<dependency>
38+
<groupId>org.springframework.cloud</groupId>
39+
<artifactId>spring-cloud-gcp-starter-logging</artifactId>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.springframework.boot</groupId>
43+
<artifactId>spring-boot-starter-data-jpa</artifactId>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.springframework.boot</groupId>
47+
<artifactId>spring-boot-starter-data-rest</artifactId>
48+
</dependency>
49+
<dependency>
50+
<groupId>mysql</groupId>
51+
<artifactId>mysql-connector-java</artifactId>
52+
</dependency>
53+
<dependency>
54+
<groupId>io.zipkin.brave</groupId>
55+
<artifactId>brave-instrumentation-mysql8</artifactId>
56+
</dependency>
5357

54-
<dependency>
55-
<groupId>org.springframework.boot</groupId>
56-
<artifactId>spring-boot-starter-test</artifactId>
57-
<scope>test</scope>
58-
</dependency>
59-
</dependencies>
58+
<dependency>
59+
<groupId>org.springframework.boot</groupId>
60+
<artifactId>spring-boot-starter-test</artifactId>
61+
<scope>test</scope>
62+
</dependency>
63+
</dependencies>
6064

61-
<dependencyManagement>
62-
<dependencies>
63-
<dependency>
64-
<groupId>org.springframework.cloud</groupId>
65-
<artifactId>spring-cloud-dependencies</artifactId>
66-
<version>${spring-cloud.version}</version>
67-
<type>pom</type>
68-
<scope>import</scope>
69-
</dependency>
70-
</dependencies>
71-
</dependencyManagement>
65+
<dependencyManagement>
66+
<dependencies>
67+
<dependency>
68+
<groupId>org.springframework.cloud</groupId>
69+
<artifactId>spring-cloud-dependencies</artifactId>
70+
<version>${spring-cloud.version}</version>
71+
<type>pom</type>
72+
<scope>import</scope>
73+
</dependency>
74+
<!-- https://mvnrepository.com/artifact/io.zipkin.brave/brave-bom -->
75+
<dependency>
76+
<groupId>io.zipkin.brave</groupId>
77+
<artifactId>brave-bom</artifactId>
78+
<version>5.12.5</version>
79+
<type>pom</type>
80+
<scope>import</scope>
81+
</dependency>
82+
</dependencies>
83+
</dependencyManagement>
7284

73-
<build>
74-
<plugins>
75-
<!--
76-
<plugin>
77-
<groupId>org.springframework.boot</groupId>
78-
<artifactId>spring-boot-maven-plugin</artifactId>
79-
</plugin>
80-
-->
81-
<plugin>
82-
<artifactId>maven-jar-plugin</artifactId>
83-
<configuration>
84-
<archive>
85-
<manifest>
86-
<addClasspath>true</addClasspath>
87-
<classpathPrefix>lib/</classpathPrefix>
88-
<mainClass>com.example.guestbook.GuestbookServiceApplication</mainClass>
89-
</manifest>
90-
</archive>
91-
</configuration>
92-
</plugin>
93-
<plugin>
94-
<artifactId>maven-dependency-plugin</artifactId>
95-
</plugin>
96-
<plugin>
97-
<groupId>com.spotify</groupId>
98-
<artifactId>dockerfile-maven-plugin</artifactId>
99-
</plugin>
100-
<plugin>
101-
<groupId>pl.project13.maven</groupId>
102-
<artifactId>git-commit-id-plugin</artifactId>
103-
</plugin>
104-
</plugins>
105-
</build>
85+
<build>
86+
<plugins>
87+
<plugin>
88+
<groupId>org.springframework.boot</groupId>
89+
<artifactId>spring-boot-maven-plugin</artifactId>
90+
</plugin>
91+
<plugin>
92+
<groupId>pl.project13.maven</groupId>
93+
<artifactId>git-commit-id-plugin</artifactId>
94+
</plugin>
95+
<plugin>
96+
<groupId>com.google.cloud.tools</groupId>
97+
<artifactId>jib-maven-plugin</artifactId>
98+
</plugin>
99+
</plugins>
100+
</build>
106101

107102

108103
</project>

examples-java/guestbook-service/src/main/java/com/example/guestbook/JdbcTraceAspect.java

Lines changed: 0 additions & 50 deletions
This file was deleted.

examples-java/guestbook-service/src/main/resources/application.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
spring:
22
application:
33
name: guestbook-service
4-
zipkin:
5-
baseUrl: http://zipkin:9411/
64
data:
75
rest:
86
base-path: /api
97
datasource:
10-
driverClassName: com.mysql.jdbc.Driver
118
url: jdbc:mysql://mysql:3306/app?autoReconnect=true
129
username: root
1310
password: yourpassword
1411
test-on-borrow: true
1512
validation-query: SELECT 1
1613
jpa:
17-
database-platform: org.hibernate.dialect.MySQLDialect
1814
hibernate:
1915
generate-ddl: true
2016
ddl-auto: update
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<configuration>
2+
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
3+
<include resource="org/springframework/cloud/gcp/logging/logback-json-appender.xml"/>
4+
5+
<root level="INFO">
6+
<appender-ref ref="CONSOLE_JSON"/>
7+
</root>
8+
</configuration>

examples-java/helloworld-service/Dockerfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples-java/helloworld-service/pom.xml

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2323
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2424
<java.version>1.8</java.version>
25-
<spring-cloud.version>Dalston.RELEASE</spring-cloud.version>
2625
</properties>
2726

2827
<dependencies>
@@ -36,13 +35,12 @@
3635
</dependency>
3736
<dependency>
3837
<groupId>org.springframework.cloud</groupId>
39-
<artifactId>spring-cloud-starter-sleuth</artifactId>
38+
<artifactId>spring-cloud-gcp-starter-trace</artifactId>
4039
</dependency>
4140
<dependency>
4241
<groupId>org.springframework.cloud</groupId>
43-
<artifactId>spring-cloud-starter-zipkin</artifactId>
42+
<artifactId>spring-cloud-gcp-starter-logging</artifactId>
4443
</dependency>
45-
4644
<dependency>
4745
<groupId>org.springframework.boot</groupId>
4846
<artifactId>spring-boot-starter-test</artifactId>
@@ -64,35 +62,18 @@
6462

6563
<build>
6664
<plugins>
67-
<!--
6865
<plugin>
6966
<groupId>org.springframework.boot</groupId>
7067
<artifactId>spring-boot-maven-plugin</artifactId>
7168
</plugin>
72-
-->
73-
<plugin>
74-
<artifactId>maven-jar-plugin</artifactId>
75-
<configuration>
76-
<archive>
77-
<manifest>
78-
<addClasspath>true</addClasspath>
79-
<classpathPrefix>lib/</classpathPrefix>
80-
<mainClass>com.example.guestbook.HelloworldApplication</mainClass>
81-
</manifest>
82-
</archive>
83-
</configuration>
84-
</plugin>
85-
<plugin>
86-
<artifactId>maven-dependency-plugin</artifactId>
87-
</plugin>
88-
<plugin>
89-
<groupId>com.spotify</groupId>
90-
<artifactId>dockerfile-maven-plugin</artifactId>
91-
</plugin>
9269
<plugin>
9370
<groupId>pl.project13.maven</groupId>
9471
<artifactId>git-commit-id-plugin</artifactId>
9572
</plugin>
73+
<plugin>
74+
<groupId>com.google.cloud.tools</groupId>
75+
<artifactId>jib-maven-plugin</artifactId>
76+
</plugin>
9677
</plugins>
9778
</build>
9879

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<configuration>
2+
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
3+
<include resource="org/springframework/cloud/gcp/logging/logback-json-appender.xml"/>
4+
5+
<root level="INFO">
6+
<appender-ref ref="CONSOLE_JSON"/>
7+
</root>
8+
</configuration>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/*
2+
!target/lib/*
3+
!target/helloworld-ui-0.0.1-SNAPSHOT.jar

examples-java/helloworld-ui/Dockerfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)