From 873c643877d90c57e3a6685172940823e88eb064 Mon Sep 17 00:00:00 2001
From: LeJingS <157603342+LeJingS@users.noreply.github.com>
Date: Wed, 4 Dec 2024 16:02:08 +0800
Subject: [PATCH] =?UTF-8?q?2024=E5=B9=B412=E6=9C=884=E6=97=A516:02:05?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
javaweb_word/server/DB/.idea/.gitignore | 8 ++
javaweb_word/server/DB/.idea/compiler.xml | 19 +++
javaweb_word/server/DB/.idea/dataSources.xml | 31 +++++
javaweb_word/server/DB/.idea/encodings.xml | 6 +
.../server/DB/.idea/jarRepositories.xml | 20 +++
javaweb_word/server/DB/.idea/misc.xml | 14 ++
javaweb_word/server/DB/.idea/uiDesigner.xml | 124 ++++++++++++++++++
javaweb_word/server/DB/.idea/vcs.xml | 6 +
javaweb_word/server/DB/DB.iml | 9 ++
javaweb_word/server/DB/pom.xml | 83 ++++++++++++
.../java/top/lejings/db/DbApplication.java | 13 ++
.../DB/src/main/java/top/lejings/db/find.java | 18 +++
.../java/top/lejings/db/http/httpDelete.java | 19 +++
.../java/top/lejings/db/http/httpInsert.java | 20 +++
.../java/top/lejings/db/http/httpSelect.java | 88 +++++++++++++
.../java/top/lejings/db/http/httpUpdate.java | 17 +++
.../java/top/lejings/db/mapper/delete.java | 12 ++
.../java/top/lejings/db/mapper/insert.java | 11 ++
.../top/lejings/db/mapper/selectById.java | 16 +++
.../top/lejings/db/mapper/selectByOther.java | 43 ++++++
.../java/top/lejings/db/mapper/update.java | 11 ++
.../src/main/java/top/lejings/db/people.java | 21 +++
.../src/main/resources/application.properties | 15 +++
.../top/lejings/db/DbApplicationTests.java | 13 ++
.../DB/target/classes/application.properties | 15 +++
.../top/lejings/db/DbApplication.class | Bin 0 -> 723 bytes
.../target/classes/top/lejings/db/find.class | Bin 0 -> 1098 bytes
.../top/lejings/db/http/httpDelete.class | Bin 0 -> 909 bytes
.../top/lejings/db/http/httpInsert.class | Bin 0 -> 1029 bytes
.../top/lejings/db/http/httpSelect.class | Bin 0 -> 3013 bytes
.../top/lejings/db/http/httpUpdate.class | Bin 0 -> 1110 bytes
.../top/lejings/db/mapper/delete.class | Bin 0 -> 384 bytes
.../top/lejings/db/mapper/insert.class | Bin 0 -> 491 bytes
.../top/lejings/db/mapper/selectById.class | Bin 0 -> 492 bytes
.../top/lejings/db/mapper/selectByOther.class | Bin 0 -> 1752 bytes
.../top/lejings/db/mapper/update.class | Bin 0 -> 524 bytes
.../classes/top/lejings/db/people.class | Bin 0 -> 3438 bytes
37 files changed, 652 insertions(+)
create mode 100644 javaweb_word/server/DB/.idea/.gitignore
create mode 100644 javaweb_word/server/DB/.idea/compiler.xml
create mode 100644 javaweb_word/server/DB/.idea/dataSources.xml
create mode 100644 javaweb_word/server/DB/.idea/encodings.xml
create mode 100644 javaweb_word/server/DB/.idea/jarRepositories.xml
create mode 100644 javaweb_word/server/DB/.idea/misc.xml
create mode 100644 javaweb_word/server/DB/.idea/uiDesigner.xml
create mode 100644 javaweb_word/server/DB/.idea/vcs.xml
create mode 100644 javaweb_word/server/DB/DB.iml
create mode 100644 javaweb_word/server/DB/pom.xml
create mode 100644 javaweb_word/server/DB/src/main/java/top/lejings/db/DbApplication.java
create mode 100644 javaweb_word/server/DB/src/main/java/top/lejings/db/find.java
create mode 100644 javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpDelete.java
create mode 100644 javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpInsert.java
create mode 100644 javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpSelect.java
create mode 100644 javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpUpdate.java
create mode 100644 javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/delete.java
create mode 100644 javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/insert.java
create mode 100644 javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/selectById.java
create mode 100644 javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/selectByOther.java
create mode 100644 javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/update.java
create mode 100644 javaweb_word/server/DB/src/main/java/top/lejings/db/people.java
create mode 100644 javaweb_word/server/DB/src/main/resources/application.properties
create mode 100644 javaweb_word/server/DB/src/test/java/top/lejings/db/DbApplicationTests.java
create mode 100644 javaweb_word/server/DB/target/classes/application.properties
create mode 100644 javaweb_word/server/DB/target/classes/top/lejings/db/DbApplication.class
create mode 100644 javaweb_word/server/DB/target/classes/top/lejings/db/find.class
create mode 100644 javaweb_word/server/DB/target/classes/top/lejings/db/http/httpDelete.class
create mode 100644 javaweb_word/server/DB/target/classes/top/lejings/db/http/httpInsert.class
create mode 100644 javaweb_word/server/DB/target/classes/top/lejings/db/http/httpSelect.class
create mode 100644 javaweb_word/server/DB/target/classes/top/lejings/db/http/httpUpdate.class
create mode 100644 javaweb_word/server/DB/target/classes/top/lejings/db/mapper/delete.class
create mode 100644 javaweb_word/server/DB/target/classes/top/lejings/db/mapper/insert.class
create mode 100644 javaweb_word/server/DB/target/classes/top/lejings/db/mapper/selectById.class
create mode 100644 javaweb_word/server/DB/target/classes/top/lejings/db/mapper/selectByOther.class
create mode 100644 javaweb_word/server/DB/target/classes/top/lejings/db/mapper/update.class
create mode 100644 javaweb_word/server/DB/target/classes/top/lejings/db/people.class
diff --git a/javaweb_word/server/DB/.idea/.gitignore b/javaweb_word/server/DB/.idea/.gitignore
new file mode 100644
index 0000000..35410ca
--- /dev/null
+++ b/javaweb_word/server/DB/.idea/.gitignore
@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/javaweb_word/server/DB/.idea/compiler.xml b/javaweb_word/server/DB/.idea/compiler.xml
new file mode 100644
index 0000000..ea06312
--- /dev/null
+++ b/javaweb_word/server/DB/.idea/compiler.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/javaweb_word/server/DB/.idea/dataSources.xml b/javaweb_word/server/DB/.idea/dataSources.xml
new file mode 100644
index 0000000..1271fcd
--- /dev/null
+++ b/javaweb_word/server/DB/.idea/dataSources.xml
@@ -0,0 +1,31 @@
+
+
+
+
+ mysql.8
+ true
+ com.mysql.cj.jdbc.Driver
+ jdbc:mysql://localhost:3306
+
+
+
+
+
+ $ProjectFileDir$
+
+
+ mysql.8
+ true
+ true
+ $PROJECT_DIR$/src/main/resources/application.properties
+ com.mysql.cj.jdbc.Driver
+ jdbc:mysql://localhost:3306/web01
+
+
+
+
+
+ $ProjectFileDir$
+
+
+
\ No newline at end of file
diff --git a/javaweb_word/server/DB/.idea/encodings.xml b/javaweb_word/server/DB/.idea/encodings.xml
new file mode 100644
index 0000000..63e9001
--- /dev/null
+++ b/javaweb_word/server/DB/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/javaweb_word/server/DB/.idea/jarRepositories.xml b/javaweb_word/server/DB/.idea/jarRepositories.xml
new file mode 100644
index 0000000..abb532a
--- /dev/null
+++ b/javaweb_word/server/DB/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/javaweb_word/server/DB/.idea/misc.xml b/javaweb_word/server/DB/.idea/misc.xml
new file mode 100644
index 0000000..cbec6ae
--- /dev/null
+++ b/javaweb_word/server/DB/.idea/misc.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/javaweb_word/server/DB/.idea/uiDesigner.xml b/javaweb_word/server/DB/.idea/uiDesigner.xml
new file mode 100644
index 0000000..2b63946
--- /dev/null
+++ b/javaweb_word/server/DB/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/javaweb_word/server/DB/.idea/vcs.xml b/javaweb_word/server/DB/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/javaweb_word/server/DB/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/javaweb_word/server/DB/DB.iml b/javaweb_word/server/DB/DB.iml
new file mode 100644
index 0000000..68a9707
--- /dev/null
+++ b/javaweb_word/server/DB/DB.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/javaweb_word/server/DB/pom.xml b/javaweb_word/server/DB/pom.xml
new file mode 100644
index 0000000..a2e48d8
--- /dev/null
+++ b/javaweb_word/server/DB/pom.xml
@@ -0,0 +1,83 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 3.4.0
+
+
+ top.lejings
+ DB
+ 0.0.1-SNAPSHOT
+ DB
+ DB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 23
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+ 3.0.4
+
+
+
+ com.mysql
+ mysql-connector-j
+ runtime
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter-test
+ 3.0.4
+ test
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+
+
+
+
diff --git a/javaweb_word/server/DB/src/main/java/top/lejings/db/DbApplication.java b/javaweb_word/server/DB/src/main/java/top/lejings/db/DbApplication.java
new file mode 100644
index 0000000..810bc41
--- /dev/null
+++ b/javaweb_word/server/DB/src/main/java/top/lejings/db/DbApplication.java
@@ -0,0 +1,13 @@
+package top.lejings.db;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class DbApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(DbApplication.class, args);
+ }
+
+}
diff --git a/javaweb_word/server/DB/src/main/java/top/lejings/db/find.java b/javaweb_word/server/DB/src/main/java/top/lejings/db/find.java
new file mode 100644
index 0000000..8705860
--- /dev/null
+++ b/javaweb_word/server/DB/src/main/java/top/lejings/db/find.java
@@ -0,0 +1,18 @@
+package top.lejings.db;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@RestController
+public class find {
+
+ @RequestMapping("/find")
+ public List find(){
+ List peoples = new ArrayList<>();
+ peoples.add(new people(1,"lejings","123456","lejings@qq.com"));
+ return peoples;
+ }
+}
diff --git a/javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpDelete.java b/javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpDelete.java
new file mode 100644
index 0000000..1e885fb
--- /dev/null
+++ b/javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpDelete.java
@@ -0,0 +1,19 @@
+package top.lejings.db.http;
+
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import top.lejings.db.mapper.delete;
+
+@RestController
+public class httpDelete {
+ @Autowired
+ private delete delete;
+
+ @RequestMapping("/delete")
+ public String delete(Integer id){
+ delete.deletePeople(id);
+ return "删除成功!!!";
+ }
+}
diff --git a/javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpInsert.java b/javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpInsert.java
new file mode 100644
index 0000000..fb1b750
--- /dev/null
+++ b/javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpInsert.java
@@ -0,0 +1,20 @@
+package top.lejings.db.http;
+
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import top.lejings.db.mapper.insert;
+
+@RestController
+public class httpInsert {
+
+ @Autowired
+ private insert insert;
+
+ @RequestMapping("/insert")
+ public String insert(String name,String password,String email){
+ insert.insertPeople(name,password,email);
+ return "添加成功!!!";
+ }
+}
diff --git a/javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpSelect.java b/javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpSelect.java
new file mode 100644
index 0000000..e4682b3
--- /dev/null
+++ b/javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpSelect.java
@@ -0,0 +1,88 @@
+package top.lejings.db.http;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import top.lejings.db.mapper.selectById;
+import top.lejings.db.mapper.selectByOther;
+import top.lejings.db.people;
+
+import java.util.List;
+
+@RestController
+public class httpSelect {
+ @Autowired
+ private selectById selectById;
+ @Autowired
+ private selectByOther selectByOther;
+
+ @RequestMapping("/selectAll")
+ public List selectAll()
+ {
+ return selectByOther.selectByOtherAll();
+ }
+
+
+
+ @RequestMapping("/select")
+ public List select(Integer id,String name,String password,String email)
+ {
+ System.out.println("----------------------------------");
+ System.out.println(id+" name:"+name+" pw"+password+" em"+email);
+ System.out.println("----------------------------------");
+ if(id!=null)
+ {
+ return selectById.selectById(id);
+
+ }
+ else//id为空
+ {
+ //单属性查询
+ if(!name.isBlank()&&password.isBlank()&&email.isBlank())
+ {
+ return selectByOther.selectByName(name);
+ }
+ else if(name.isBlank()&&!password.isBlank()&&email.isBlank())
+ {
+ return selectByOther.selectByPassword(password);
+ }
+ else if(name.isBlank()&&password.isBlank()&&!email.isBlank())
+ {
+ return selectByOther.selectByEmail(email);
+ }
+ //双属性查询
+ else if(!name.isBlank()&&!password.isBlank()&&email.isBlank())
+ {
+ return selectByOther.selectByNP(name,password);
+ }
+ else if(!name.isBlank()&&password.isBlank()&&!email.isBlank())
+ {
+ return selectByOther.selectByNE(name,email);
+ }
+ else if(name.isBlank()&&!password.isBlank()&&!email.isBlank())
+ {
+ return selectByOther.selectByPE(password, email);
+ }
+ //三属性查询
+ else if(!name.isBlank()&&!password.isBlank()&&!email.isBlank())
+ {
+ return selectByOther.selectByOther3(name, password, email);
+ }
+ //即全空查询,输出所有值
+ else
+ {
+ return selectByOther.selectByOtherAll();
+ }
+
+
+
+
+
+
+
+
+ }
+ }
+
+
+}
diff --git a/javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpUpdate.java b/javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpUpdate.java
new file mode 100644
index 0000000..401ebbb
--- /dev/null
+++ b/javaweb_word/server/DB/src/main/java/top/lejings/db/http/httpUpdate.java
@@ -0,0 +1,17 @@
+package top.lejings.db.http;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import top.lejings.db.mapper.update;
+
+@RestController
+public class httpUpdate {
+ @Autowired
+ private update update;
+ @RequestMapping("/update")
+ public String update(Integer id,String name,String password,String email){
+ update.updatePeople(id,name,password,email);
+ return "修改成功!!!";
+ }
+}
diff --git a/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/delete.java b/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/delete.java
new file mode 100644
index 0000000..f2bef49
--- /dev/null
+++ b/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/delete.java
@@ -0,0 +1,12 @@
+package top.lejings.db.mapper;
+
+import org.apache.ibatis.annotations.Delete;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface delete {
+
+ @Delete("delete from people where id=#{id}")
+ public void deletePeople(Integer id);
+
+}
diff --git a/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/insert.java b/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/insert.java
new file mode 100644
index 0000000..39db82e
--- /dev/null
+++ b/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/insert.java
@@ -0,0 +1,11 @@
+package top.lejings.db.mapper;
+
+import org.apache.ibatis.annotations.Insert;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface insert {
+
+ @Insert("insert into people(name,password,email) values(#{name},#{password},#{email})")
+ public void insertPeople(String name,String password,String email);
+}
diff --git a/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/selectById.java b/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/selectById.java
new file mode 100644
index 0000000..0a36341
--- /dev/null
+++ b/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/selectById.java
@@ -0,0 +1,16 @@
+package top.lejings.db.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+import top.lejings.db.people;
+
+import java.util.List;
+
+@Mapper
+public interface selectById {
+
+ @Select("select * from people where id=#{id}")
+ public List selectById(Integer id);
+
+
+}
diff --git a/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/selectByOther.java b/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/selectByOther.java
new file mode 100644
index 0000000..db7bffc
--- /dev/null
+++ b/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/selectByOther.java
@@ -0,0 +1,43 @@
+package top.lejings.db.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+import top.lejings.db.people;
+
+import java.util.List;
+
+@Mapper
+public interface selectByOther {
+
+//原则:id和email不许重复
+ @Select("select * from people")
+ public List selectByOtherAll();
+
+ //单属性查询
+ @Select("select * from people where name=#{name}")
+ public List selectByName(String name);
+
+ @Select("select * from people where password=#{password}")
+ public List selectByPassword(String password);
+
+ @Select("select * from people where email=#{email}")
+ public List selectByEmail(String email);
+
+
+ //双属性查询
+ @Select("select * from people where name=#{name} and password=#{password}")
+ public List selectByNP(String name,String password);
+
+ @Select("select * from people where name=#{name} and email=#{email}")
+ public List selectByNE(String name,String email);
+
+ @Select("select * from people where password=#{password} and email=#{email}")
+ public List selectByPE(String password,String email);
+
+
+
+ @Select("select * from people where name=#{name} and password=#{password} and email=#{email}")
+ public List selectByOther3(String name,String password,String email);
+
+
+}
diff --git a/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/update.java b/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/update.java
new file mode 100644
index 0000000..6f50df1
--- /dev/null
+++ b/javaweb_word/server/DB/src/main/java/top/lejings/db/mapper/update.java
@@ -0,0 +1,11 @@
+package top.lejings.db.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Update;
+
+@Mapper
+public interface update {
+
+ @Update("update people set name=#{name},password=#{password},email=#{email} where id=#{id}")
+ public void updatePeople(Integer id,String name,String password,String email);
+}
diff --git a/javaweb_word/server/DB/src/main/java/top/lejings/db/people.java b/javaweb_word/server/DB/src/main/java/top/lejings/db/people.java
new file mode 100644
index 0000000..4efe3bb
--- /dev/null
+++ b/javaweb_word/server/DB/src/main/java/top/lejings/db/people.java
@@ -0,0 +1,21 @@
+package top.lejings.db;
+
+import lombok.Data;
+
+@Data
+public class people {
+
+
+ private Integer id;
+ private String name;
+ private String password;
+ private String email;
+
+
+ public people(Integer id, String name, String password, String email) {
+ this.id = id;
+ this.name = name;
+ this.password = password;
+ this.email = email;
+ }
+}
diff --git a/javaweb_word/server/DB/src/main/resources/application.properties b/javaweb_word/server/DB/src/main/resources/application.properties
new file mode 100644
index 0000000..97cf16b
--- /dev/null
+++ b/javaweb_word/server/DB/src/main/resources/application.properties
@@ -0,0 +1,15 @@
+spring.application.name=DB
+
+spring.mvc.cors.allowed-origins=http://localhost:5173
+spring.mvc.cors.allowed-methods=GET,POST,PUT,DELETE,OPTIONS
+spring.mvc.cors.allowed-headers=*
+spring.mvc.cors.allow-credentials=true
+
+#??????????
+spring.datasource.url=jdbc:mysql://localhost:3306/web01
+spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
+spring.datasource.username=root
+spring.datasource.password=123456
+
+#??Mybatis???????????
+mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
diff --git a/javaweb_word/server/DB/src/test/java/top/lejings/db/DbApplicationTests.java b/javaweb_word/server/DB/src/test/java/top/lejings/db/DbApplicationTests.java
new file mode 100644
index 0000000..85b31b2
--- /dev/null
+++ b/javaweb_word/server/DB/src/test/java/top/lejings/db/DbApplicationTests.java
@@ -0,0 +1,13 @@
+package top.lejings.db;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class DbApplicationTests {
+
+ @Test
+ void contextLoads() {
+ }
+
+}
diff --git a/javaweb_word/server/DB/target/classes/application.properties b/javaweb_word/server/DB/target/classes/application.properties
new file mode 100644
index 0000000..97cf16b
--- /dev/null
+++ b/javaweb_word/server/DB/target/classes/application.properties
@@ -0,0 +1,15 @@
+spring.application.name=DB
+
+spring.mvc.cors.allowed-origins=http://localhost:5173
+spring.mvc.cors.allowed-methods=GET,POST,PUT,DELETE,OPTIONS
+spring.mvc.cors.allowed-headers=*
+spring.mvc.cors.allow-credentials=true
+
+#??????????
+spring.datasource.url=jdbc:mysql://localhost:3306/web01
+spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
+spring.datasource.username=root
+spring.datasource.password=123456
+
+#??Mybatis???????????
+mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
diff --git a/javaweb_word/server/DB/target/classes/top/lejings/db/DbApplication.class b/javaweb_word/server/DB/target/classes/top/lejings/db/DbApplication.class
new file mode 100644
index 0000000000000000000000000000000000000000..af77cb130e0c265311d09ec58d4d6823a4b7b02e
GIT binary patch
literal 723
zcmaJMi8J-naxIK@cZHQB$Rdp4QG{Hg$HR^&0qFoIo7-
z0sJV$tUlhDlO0RaU|_;pUcn+O)S!Zu*%!-&Z@go8N*Ka+2$T~EEH|9-kvt_
zfa1a?gtIawOx&MIcV&hb!t>;$rNlLwaz`*T@hX)>BFFs
zWs=Re1hlY1)*M!`Mj*a;zW@X3t)TOOxj!HE{uDvi6JWlCQO7#Il7EB#8c|ECg3UsH
L!*|lY?H2F~)l#^T
literal 0
HcmV?d00001
diff --git a/javaweb_word/server/DB/target/classes/top/lejings/db/find.class b/javaweb_word/server/DB/target/classes/top/lejings/db/find.class
new file mode 100644
index 0000000000000000000000000000000000000000..c8d288673db54ef0b21b3192859f7a002f0c8105
GIT binary patch
literal 1098
zcmb7DYflqF6g|@iTb9bBNELh`zFMk`JT)mH5)u-URT3~Y=%;Br)WPlUvO5dmU+E`Q
z5`Ta{%6MnD3IZ{jCU-jL-Z|&axjWx~eEkMs4bN<3khPF2B9A_X;XQF6xGTI4-)!#5
zmS*T%R-V!;4B1MxVWGeOOYl6=@_FTywZ1|M{oAVJ2_1*j
zeeFUEe>*w86?G*QRNcrVuEU(D2(9iMb*bAyok+q!g;Q%7xQxcA8As%!Jw5M!Z4A
zi7O{K@BknoAvo{=yho9E34}KZC5l=OvE#A**`MwG@%!6%0Cn8T!$T^EbO9M;8A@Go
zD0nDzn?LirvgH`E_mx)e0YhqSy*Y~+%;u0UU=9U_sxy5a%C6GwhzCCJIM*MFhcc8-
zQgSfB!O?m&J2{5!6rkxZUXA1*ic$NjeEYd`-0#Z$_>*JVN+O@
z*yG2v>nN(XIz5%C0TS-*Q^`#b-g8N}6zQpeVQIqicNDbNZRt8D*bxaQC+(S32h!)h
z(!nIlUHLMWk=v$)jS6KBMHmya+<1Eo`8^ZcmVB%d!o`Hd=m72}dpT>Yr`L*H-Dqb`
z7}63^qkHq{Qi)x1aiq_al_gyv?UAOlC3%4?PMVRn&0@0+?}tO_fTH?NDm$okmNG~N~9NuK$TJO7>Lqv1yusPN>Ld`
c28N9;(9{Y4R}zkok`tEn*|O-wXJ37Fn+wWnuk7f*MOd$u&bf#J$G
z&_~e3gs6!R;CsMh7-vr#G)0UtCue4NXXcxkZ)d;%`0@=v9ZMzTkT0T8#u&yKW_QG{
z;IYtc{yf}~EypnaP-*2JG31w)o0FKpWD%t@rch>Ba3RcqsfQ%0u@_Z!Bxd7Ahv+g5aC
z-`JNtltQO`TeO_9uemr1;Hy1n`pU|v#!#r6h{_EbO3P=xZYb>wLGTQfhG~hoDXjAQ
z;bFmb6y;kSC2oXc!hQO`{U0ZZiqzDTFX}(>SHwNaUL4K^Luu3WY)d{?o~OX~J{YZgzPyue
zm=|PY@PdiSUkse#w2m6?rFOc+R
zpoBS+9)KKh5tm3af}BS_3*JJ3J|I~6gyQWxcRypgfXe9)bd-aK@lOym_hnQvsFi{H
z5Q+kE84DSFfGf1}-T@YAm8UL%={z}rOrS$#ZOoASRr;@Ofu*=kAveg9!_A{6Zvj66
D6#ob}
literal 0
HcmV?d00001
diff --git a/javaweb_word/server/DB/target/classes/top/lejings/db/http/httpSelect.class b/javaweb_word/server/DB/target/classes/top/lejings/db/http/httpSelect.class
new file mode 100644
index 0000000000000000000000000000000000000000..813a8589bc98d55dec3affbb64410d55afd84b55
GIT binary patch
literal 3013
zcmcIm>sA|86#h;U7)YnwYA>-C0tMyTv9{LQAPSLMG^I$8YO&f$avFwAW~MVIuy_I=
zz(2wp_^-OOF8aft{?G@|r|<<_%jG_2CLsY9#kDk9Gv~JVx36dK`StJTKLf~OD~TB5
z8WK9%(9Y1aVQ!j+Z8~M+USWe51w;F^Ua&K49U8K7fR%W
z7X)&lL{S{agoa7UKE;qeK8g}_&_@HHbNo_Ca_z)j4bk&Vkmyld`
z=R_KuKqrROa?KG|m9JWXRj~Q2u(!ogT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VH49)oKjWtEqOXD_bg2K_nNoHcmKYbi#1E
zX>5llvCpz@MOSVc`-}%t=!CC}wlnqx7kdGGF?D8JSs5-ce73?xs`ZJ6Xq
zk~xwzQM8|;8z;#~7Un;JeaOtGY4>Je1k<#80CK#;>bD4LQDwv}b-g<#fd0h18
jJh_6LKxU8uSy|&0e2LcOCtwM#5WrQk2dzEv^fn)3vh6}yas?@en
zPw9fQKp1T3DZ9F4!tv#Jt9i763-+U{nXFDY%w0a!URQF?H-yOKgp=pi22=6OG$t+i
z)>;>IFwTnLV(fgObgi>FE0YS`D7_V^`?a$Xp|jLwE8ovHW|BAWs-#|9O5W$}IWhUo
z`G?6r3B4EB`ivjU%5HzNaJ};U|G&vPkWrUF*pc7>l2AJ6B0?-vhp;DYU+PdKJ*oaH
SsKG!42ZBa|uh_0IN5CI-WoStN
literal 0
HcmV?d00001
diff --git a/javaweb_word/server/DB/target/classes/top/lejings/db/mapper/insert.class b/javaweb_word/server/DB/target/classes/top/lejings/db/mapper/insert.class
new file mode 100644
index 0000000000000000000000000000000000000000..795cf7e65c01230ea3b79f87b1d291aa46196962
GIT binary patch
literal 491
zcma)3%SuBr5Iwnl+J{zmf{Q{yS}0~MU5OwFEfx#ixXNuqn{sawl2jL^Kjy*@@T0`J
zDWywY44Ij8awc=~{qy++;1O3fBn&sfSf0s^(ksuGDbIzq(s8A|bfJbaLuVu21BouAI2>i
zDl!);W4M0Z>Y#EtS6-!=e9+ni5tPw%>vnA1iVG_iYspngZO_Gtz@OtrBNBTT*_QOj
zhb6j72h+82m3}dKc$_g
zpEik}kE#p|CHfnHk?$2$k)TFZyM#I&XA}*JCdD~XTNLd#Fi%y23+g85M6^oCCGZP(
CWsLm*
literal 0
HcmV?d00001
diff --git a/javaweb_word/server/DB/target/classes/top/lejings/db/mapper/selectById.class b/javaweb_word/server/DB/target/classes/top/lejings/db/mapper/selectById.class
new file mode 100644
index 0000000000000000000000000000000000000000..d3106a7908a7f8c2f5d5025dfbf5d7449783cde1
GIT binary patch
literal 492
zcma)3O-sW-5S@*-vGt?Xo3}tw)Pws2Vhbt=g%rht7f+jJOt)-y!|tXc;ve(i5Aa8c
zV{!<1(Zevzytnga-hO_)e*nNW9E1=sh`cGe!j;sy<5|iJQI=@ALxl@}^)k&u*kmwV
ziM8NL=$zlCD?%9bTMC1tlcZ%#wZ|N7eA@IXFBMOu^D)htpKCVF0?#Ykr3(W}hf$c(wE>;iA3q9=pane!i4
z{#KpUrpH|d3^wR<02rCxfi6`cRUHOflzJ2a^kJLw9#MBFb{~N`ssb3)=&(k+gzN)+
E17yC6tpET3
literal 0
HcmV?d00001
diff --git a/javaweb_word/server/DB/target/classes/top/lejings/db/mapper/selectByOther.class b/javaweb_word/server/DB/target/classes/top/lejings/db/mapper/selectByOther.class
new file mode 100644
index 0000000000000000000000000000000000000000..01521ed0a740bff76988e74e84da4f07ebe6c6c8
GIT binary patch
literal 1752
zcmb_c%Wl&^6upx)PnuFfd6ZY(rnD(Y%mRr8p@vE6!
zT=Jnh{?tV&btEN$X8WM4fq@c|c7?Ax1Zt)j+e`%>
zC-C?ez>DsZ1(!RnMrhY~WPJ1-%LvO5SdF?kV-})z+hGH`Q&V{uOedwM^;51U&Zy5k
zWGU{Up%q&T9Oe+n>UlrSrg4FD;Kr=NVe9j3`I5-L&wT&F@kRuy?&arvhKudabs`jM
zMW3kGh>|$5n80C{c(@*9IMNW5(JN}yBaO2@foCaErJ?LdZ3q)Ku!G
z6L>@ZMo7Ha&4q}b%wDNKKO(34IqZ}P5Gdla2~fqiumoi&Kn4F5pb9ly*YLcKzbhYr
z_^^tY2JRK%DxQ__rs5L9ucg472)~|$Z)C!6ApB+$ek&7x8{wO9XKtoe&}QNacT)`A
zL(2VSN?aw4@&GAYNy@B3HpM{7HtfueHHw$UVp=Q3+%AUx5XB3yr%%fm`#!)=VMEsr
literal 0
HcmV?d00001
diff --git a/javaweb_word/server/DB/target/classes/top/lejings/db/mapper/update.class b/javaweb_word/server/DB/target/classes/top/lejings/db/mapper/update.class
new file mode 100644
index 0000000000000000000000000000000000000000..7cfbd0bae06a44be679354a2abb2175ccf7a3b53
GIT binary patch
literal 524
zcma)3%}N6?5T304v#qt&li*=N5QSnMpm-2L5L&Djd-0U*4%?L7BqZ7PAp2q-d;lLx
zoZV9DO%ETF`DQZT{Cs_Xd;-8doHij~aPGC?DXyeS9FHTO31iUm+{D6T6KV|lE3p!sTF;_9BZ3!VZ>sITt-AYF7^rh
zwVHH9#nvLtss8hJxX@J7g${jK3g2G5m!=r*uL1`H19Z~%;sQilcv&?IkAgBF=XLYvSbbO}95KO*$r
TfH^p(G8SjJaP$Ue{7oW0XLr+VVgxRnNwV*G&vTyhesBK#`@ydOX0Vn<
z0!bZ;2^E?^?@jBLm9JRtYW~8?O}pd^XeS)k@!t?gj%AlqFp$!bHqixBV9@uf`HFqh
zaaZg4@=CsHd)109kZ{TZJLj5YMc21i?b?()zr#cidIc2M+90++23zuLqzX{|CU#1c
zQMKyzPrO=L9vw6>B$cYYVL6pFHM>k?u$!=w<<5S*X;o;{Sd20BVk&z@g7=zu4*Pg~
z)%J_DaBwUegEnlGA=z)@1xc&flCv%kA2cz7LjpPvF9enkv>cCYm(UkYj7ex0p^K6E
zQlB$1F7*cWv!MqGOqw{1Je6x!eQm}oGbD_3v7h;Q*~AgNA~3vRt=lu6TeAGij!%$V
z_bu123tWr)+HfG|Q)JY$XyT!WjtR{DkNnF_dFWryoa5RHn;R>3?UJ=33#Nb0D_NCg
ztLDgcq*VMhhdvI^b*!=}R_na&uX*J~tHylzc8%aY7dKts*|3Z5EvN2~>y+zyzU4cN
znY^arZLE0f`E#~w*DT*IlSQqE)iBh_*DS5p2?#UZQd&`vB%+ImMxvQXu7dOm2(Puk
zqjKb>p1)?-$Sr*wk?mpxnm|ki%CJ4sp*mc22OEu!5ZDoJHWldr5OfEv3U{Mb_mXdw
z*5|Ei6kT=kVsU?*{
zE+FMdbDTKtEpOesNUhTHPH}Nz^z|e;CmRqja^^rNxTi>isJ+U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