Skip to content

Commit

Permalink
arthas-spring-boot-starter support spring boot3. #2524
Browse files Browse the repository at this point in the history
  • Loading branch information
hengyunabc committed Jan 2, 2024
1 parent 2b46058 commit fee635f
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arthas-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
<executions>
<execution>
<id>integration-test</id>
<phase>test</phase>
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
</execution>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# A comma or space separated list of goals/phases to execute, may
# specify an empty list to execute the default goal of the IT project.
# Environment variables used by maven plugins can be added here
invoker.goals = clean spring-boot:run
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>@spring-boot.version@</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>arthas-spring-boot-starter-example</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>arthas-spring-boot-starter-example</name>
<description>Demo project for Spring Boot</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>@project.groupId@</groupId>
<artifactId>@project.artifactId@</artifactId>
<version>@project.version@</version>
</dependency>

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

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<plugins>
<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,18 @@
package com.example.arthasspringbootstarterexample;

import java.util.concurrent.TimeUnit;

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

@SpringBootApplication
public class ArthasSpringBootStarterExampleApplication {

public static void main(String[] args) throws InterruptedException {
SpringApplication.run(ArthasSpringBootStarterExampleApplication.class, args);
System.out.println("xxxxxxxxxxxxxxxxxx");
TimeUnit.SECONDS.sleep(3);
System.exit(0);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.example.arthasspringbootstarterexample;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class ArthasSpringBootStarterExampleApplicationTests {

@Test
void contextLoads() {
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
def file = new File(basedir, "build.log")
return file.text.contains("Arthas agent start success.")

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
com.alibaba.arthas.spring.ArthasConfiguration
com.alibaba.arthas.spring.endpoints.ArthasEndPointAutoConfiguration
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.source>1.6</maven.compiler.source>
<spring-boot.version>2.7.11</spring-boot.version>
<spring-boot3.version>3.0.6</spring-boot3.version>
<maven-invoker-plugin.version>3.0.0</maven-invoker-plugin.version>
<project.build.outputTimestamp>2020-09-27T15:10:43Z</project.build.outputTimestamp>
<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
Expand Down

0 comments on commit fee635f

Please sign in to comment.