Skip to content

Commit

Permalink
[#noissue] Add pinpoint-spring-boot3-testweb
Browse files Browse the repository at this point in the history
  • Loading branch information
emeroad committed May 9, 2023
1 parent f9a586c commit 704bd85
Show file tree
Hide file tree
Showing 7 changed files with 169 additions and 1 deletion.
9 changes: 9 additions & 0 deletions agent-testweb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,13 @@
</plugins>
</pluginManagement>
</build>

<profiles>
<profile>
<id>jdk17</id>
<modules>
<module>spring-boot3-testweb</module>
</modules>
</profile>
</profiles>
</project>
85 changes: 85 additions & 0 deletions agent-testweb/spring-boot3-testweb/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.navercorp.pinpoint</groupId>
<artifactId>pinpoint-agent-testweb</artifactId>
<version>2.6.0-SNAPSHOT</version>
</parent>

<artifactId>pinpoint-spring-boot3-testweb</artifactId>
<packaging>jar</packaging>

<properties>
<pinpoint.agent.jvmargument>
${pinpoint.agent.default.jvmargument}
</pinpoint.agent.jvmargument>

<jdk.version>17</jdk.version>
<jdk.home>${env.JAVA_17_HOME}</jdk.home>
<spring.version>${spring6.version}</spring.version>
<spring.boot.version>${spring.boot3.version}</spring.boot.version>
<jakarta.annotation-api.version>${jakarta.annotation-api2.version}</jakarta.annotation-api.version>
<jaxb.version>${jaxb4.version}</jaxb.version>

<spring-boot-build-skip>true</spring-boot-build-skip>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.1.0</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<!-- jdk 17 is required -->
<!-- <plugin>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<!-- </plugin>-->
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.pinpoint.test.springboot3;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication()
public class SpringBoot3DemoApplication {

public static void main(String[] args) {
SpringApplication.run(SpringBoot3DemoApplication.class, args);
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.pinpoint.test.springboot3.controller;

import com.pinpoint.test.springboot3.service.TestService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

private final TestService testService;

public TestController(TestService testService) {
this.testService = testService;
}

@GetMapping(value = "/helloworld")
public String helloworld() {
return "helloworld";
}


@GetMapping(value = "/async")
public String async() {
return "async " + testService.getHello() + " world";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.pinpoint.test.springboot3.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class TestService {

@Async
public String getHello() {
return "hello";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Defined in commandlineArgument of agent-test pom.xml

server:
port: 18080

logging:
level:
root: info

springdoc:
swagger-ui:
path: /

10 changes: 9 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@
<spring.security.version>5.8.1</spring.security.version>
<spring.boot.version>2.7.7</spring.boot.version>

<!-- spring boot3 dependency -->
<spring6.version>6.0.8</spring6.version>
<spring.boot3.version>3.0.6</spring.boot3.version>
<jakarta.servlet6.version>6.0.0</jakarta.servlet6.version>
<jakarta.annotation-api2.version>2.1.1</jakarta.annotation-api2.version>
<jaxb4.version>4.0.0</jaxb4.version>

<slf4j.version>1.7.30</slf4j.version>
<log4j2.version>2.20.0</log4j2.version>
<!-- for plugin & hbase client -->
Expand All @@ -174,6 +181,7 @@
<javax.servlet4.version>4.0.1</javax.servlet4.version>
<javax.servlet.version>3.0.1</javax.servlet.version>
<jakarta.servlet.version>5.0.0</jakarta.servlet.version>
<jakarta.annotation-api.version>1.3.5</jakarta.annotation-api.version>


<asm.version>9.4</asm.version>
Expand Down Expand Up @@ -1123,7 +1131,7 @@
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>1.3.5</version>
<version>${jakarta.annotation-api.version}</version>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
Expand Down

0 comments on commit 704bd85

Please sign in to comment.