commit 4251b1c4daff5e3ded7ca55d2a46c324cd952f4e Author: Amadeus Date: Fri Apr 19 22:24:53 2024 +0800 初始项目创建 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..549e00a --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..0503bcb --- /dev/null +++ b/pom.xml @@ -0,0 +1,78 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.2.5 + + + com.example + my-project-backend + 0.0.1-SNAPSHOT + war + my-project-backend + my-project-backend + + 17 + + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-web + + + + com.mysql + mysql-connector-j + runtime + + + org.projectlombok + lombok + true + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.security + spring-security-test + test + + + + + + + org.graalvm.buildtools + native-maven-plugin + + + org.springframework.boot + spring-boot-maven-plugin + + + + org.projectlombok + lombok + + + + + + + + diff --git a/src/main/java/com/example/MyProjectBackendApplication.java b/src/main/java/com/example/MyProjectBackendApplication.java new file mode 100644 index 0000000..00c9e04 --- /dev/null +++ b/src/main/java/com/example/MyProjectBackendApplication.java @@ -0,0 +1,13 @@ +package com.example; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class MyProjectBackendApplication { + + public static void main(String[] args) { + SpringApplication.run(MyProjectBackendApplication.class, args); + } + +} diff --git a/src/main/java/com/example/ServletInitializer.java b/src/main/java/com/example/ServletInitializer.java new file mode 100644 index 0000000..f722785 --- /dev/null +++ b/src/main/java/com/example/ServletInitializer.java @@ -0,0 +1,13 @@ +package com.example; + +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +public class ServletInitializer extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(MyProjectBackendApplication.class); + } + +} diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml new file mode 100644 index 0000000..fc0d2d3 --- /dev/null +++ b/src/main/resources/application.yaml @@ -0,0 +1 @@ +spring.application.name=my-project-backend diff --git a/src/test/java/com/example/MyProjectBackendApplicationTests.java b/src/test/java/com/example/MyProjectBackendApplicationTests.java new file mode 100644 index 0000000..dfe8574 --- /dev/null +++ b/src/test/java/com/example/MyProjectBackendApplicationTests.java @@ -0,0 +1,13 @@ +package com.example; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class MyProjectBackendApplicationTests { + + @Test + void contextLoads() { + } + +}