Skip to content

Commit 2c64c3b

Browse files
Adding Spring Actuator and Configuring In Memory Traces
1 parent 5788a1a commit 2c64c3b

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ dependencies {
3939
*/
4040
// Enable Spring Data with H2 in mem db
4141
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
42-
4342
compile 'org.mariadb.jdbc:mariadb-java-client:2.3.0'
4443

4544

45+
compile("org.springframework.boot:spring-boot-starter-actuator")
46+
4647

4748

4849
/**
@@ -72,3 +73,8 @@ dependencies {
7273
testCompile 'org.springframework.cloud:spring-cloud-stream-test-support'
7374
// testCompile group: 'junit', name: 'junit', version: '5.5.2'
7475
}
76+
77+
78+
task react{
79+
80+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package springboot.config;
2+
3+
import org.springframework.boot.actuate.trace.http.InMemoryHttpTraceRepository;
4+
import org.springframework.context.annotation.Bean;
5+
import org.springframework.context.annotation.Configuration;
6+
7+
@Configuration
8+
public class TracesConfiguration {
9+
@Bean
10+
InMemoryHttpTraceRepository getInMemHttpTraceRepository(){
11+
return new InMemoryHttpTraceRepository();
12+
}
13+
}

src/main/resources/application.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ server:
33

44
logging.level.root: INFO
55

6+
management:
7+
endpoints:
8+
web:
9+
exposure:
10+
include: "*"
611
spring:
712
datasource:
813
url: jdbc:mariadb://localhost:3306/ExampleDatabase

0 commit comments

Comments
 (0)