From 68785885bc4d1e7cdaa91eb1e8a513a0d04da1e2 Mon Sep 17 00:00:00 2001
From: wudi <3362189749@qq.com>
Date: Fri, 8 Mar 2024 15:29:55 +0800
Subject: [PATCH] 111
---
.gitignore | 38 ++++++++++++++
.idea/.gitignore | 8 +++
.idea/encodings.xml | 8 +++
.idea/misc.xml | 14 +++++
Dockerfile | 10 ++++
pom.xml | 52 +++++++++++++++++++
src/main/java/com/test/TestApplication.java | 14 +++++
.../com/test/controller/TestController.java | 31 +++++++++++
8 files changed, 175 insertions(+)
create mode 100644 .gitignore
create mode 100644 .idea/.gitignore
create mode 100644 .idea/encodings.xml
create mode 100644 .idea/misc.xml
create mode 100644 Dockerfile
create mode 100644 pom.xml
create mode 100644 src/main/java/com/test/TestApplication.java
create mode 100644 src/main/java/com/test/controller/TestController.java
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..63574ec
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..82dbec8
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..b5195af
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,10 @@
+#指定基础镜像
+FROM openjdk:17-alpine
+#执行工作目录
+WORKDIR apps
+#配置参数
+ARG JAR_FILE=target/*.jar
+#将编译构建得到的jar文件复制到镜像空间中
+COPY ${JAR_FILE} application.jar
+#入口,java项目的启动命令
+ENTRYPOINT java -jar application.jar
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..4dde3e9
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,52 @@
+
+
+ 4.0.0
+
+ com.test
+ Test
+ 1.0-SNAPSHOT
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.5.7
+
+
+
+
+ 17
+ 17
+ UTF-8
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+ 2.5.7
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/test/TestApplication.java b/src/main/java/com/test/TestApplication.java
new file mode 100644
index 0000000..1bce45f
--- /dev/null
+++ b/src/main/java/com/test/TestApplication.java
@@ -0,0 +1,14 @@
+package com.test;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * @ClassName TestApplication
+ * @Description 描述
+ * @Author Di.Wu
+ * @Date 2024/3/8 15:11
+ */
+
+@SpringBootApplication
+public class TestApplication {
+}
diff --git a/src/main/java/com/test/controller/TestController.java b/src/main/java/com/test/controller/TestController.java
new file mode 100644
index 0000000..f25e0ac
--- /dev/null
+++ b/src/main/java/com/test/controller/TestController.java
@@ -0,0 +1,31 @@
+package com.test.controller;
+
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @ClassName TestController
+ * @Description 描述
+ * @Author Di.Wu
+ * @Date 2024/3/8 15:12
+ */
+@RestController
+@RequestMapping("/test")
+public class TestController {
+
+
+ @GetMapping("/index")
+ public String index(){
+
+ System.out.println("+++++++++++++++++++++++++++++++++++++");
+
+ return "成功";
+ }
+
+
+
+
+
+
+}