commit aa208823191a7341f067acebce618ff998c90da8 Author: zeiss Date: Sun Mar 31 17:11:29 2024 +0800 test diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..11bd5c0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Zeppelin ignored files +/ZeppelinRemoteNotebooks/ diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..1531ea3 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..63e9001 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..22e83c6 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..010c400 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..32f1673 --- /dev/null +++ b/pom.xml @@ -0,0 +1,61 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.7.18 + + + com.example + demo + 0.0.1-SNAPSHOT + demo + Demo project for Spring Boot + + 1.8 + + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.boot + spring-boot-starter-web + + + org.apache.logging.log4j + log4j-to-slf4j + 2.20.0 + + + org.springframework + spring-web + 5.3.31 + + + org.projectlombok + lombok + RELEASE + compile + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/src/main/java/com/example/demo/DemoApplication.java b/src/main/java/com/example/demo/DemoApplication.java new file mode 100644 index 0000000..e8aa280 --- /dev/null +++ b/src/main/java/com/example/demo/DemoApplication.java @@ -0,0 +1,15 @@ +package com.example.demo; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; + +@SpringBootApplication +@ComponentScan(basePackages = "com") +public class DemoApplication { + + public static void main(String[] args) { + SpringApplication.run(DemoApplication.class, args); + } + +} diff --git a/src/main/java/com/test/HelloController.java b/src/main/java/com/test/HelloController.java new file mode 100644 index 0000000..ad5bc6a --- /dev/null +++ b/src/main/java/com/test/HelloController.java @@ -0,0 +1,17 @@ +package com.test; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Slf4j +@RestController +@RequestMapping("/v1") +public class HelloController { + @GetMapping("hello") + public String SayHello() { + log.info("SayHello: hello world!"); + return "hello world from demo test!"; + } +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties new file mode 100644 index 0000000..d449906 --- /dev/null +++ b/src/main/resources/application.properties @@ -0,0 +1,3 @@ +spring.application.name=demo +spring.profiles.active=dev +server.port=8081 diff --git a/src/test/java/com/example/demo/DemoApplicationTests.java b/src/test/java/com/example/demo/DemoApplicationTests.java new file mode 100644 index 0000000..2778a6a --- /dev/null +++ b/src/test/java/com/example/demo/DemoApplicationTests.java @@ -0,0 +1,13 @@ +package com.example.demo; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class DemoApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/target/classes/application.properties b/target/classes/application.properties new file mode 100644 index 0000000..d449906 --- /dev/null +++ b/target/classes/application.properties @@ -0,0 +1,3 @@ +spring.application.name=demo +spring.profiles.active=dev +server.port=8081 diff --git a/target/classes/com/example/demo/DemoApplication.class b/target/classes/com/example/demo/DemoApplication.class new file mode 100644 index 0000000..7e475ce Binary files /dev/null and b/target/classes/com/example/demo/DemoApplication.class differ diff --git a/target/classes/com/test/HelloController.class b/target/classes/com/test/HelloController.class new file mode 100644 index 0000000..ea5e3ab Binary files /dev/null and b/target/classes/com/test/HelloController.class differ diff --git a/target/test-classes/com/example/demo/DemoApplicationTests.class b/target/test-classes/com/example/demo/DemoApplicationTests.class new file mode 100644 index 0000000..7e21efa Binary files /dev/null and b/target/test-classes/com/example/demo/DemoApplicationTests.class differ