diff --git "a/1\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/1\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260.sql" "b/1\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/1\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260.sql" new file mode 100644 index 0000000000000000000000000000000000000000..d1c18e7f2e69d6a8c173a2945448e729e39a342a --- /dev/null +++ "b/1\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/1\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260.sql" @@ -0,0 +1,28 @@ +# 创建表先丢弃原表 +DROP TABLE IF EXISTS `权限表`; + +# 创建表结构 +CREATE TABLE `权限表` ( + `ID` int NOT NULL AUTO_INCREMENT, + `name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL, + `phone` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL, + `sex` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL, + `date` datetime NULL DEFAULT NULL, + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic; + +# 添加5行数据 其中一行数据只添加性别 +INSERT INTO `权限表` VALUES (1, NULL, NULL, '男', NULL); +INSERT INTO `权限表` VALUES (2, '刘赵杰', NULL, NULL, NULL); +INSERT INTO `权限表` VALUES (3, NULL, '123', NULL, NULL); +INSERT INTO `权限表` VALUES (4, NULL, NULL, NULL, '2022-11-26 13:12:18'); +INSERT INTO `权限表` VALUES (5, '刘赵杰', '123', '男', '2022-11-20 13:12:39'); + +SET FOREIGN_KEY_CHECKS = 1; + +# 修改两条数据 第一次修改名字 第二次修改性别 +UPDATE `权限表` set `name` = '测试' WHERE id = 2; +UPDATE `权限表` set sex = '女' WHERE id = 1; + +# 按照电话号删除一条数据 +DELETE FROM `权限表` WHERE phone = 123; \ No newline at end of file diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/.gitignore" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..13566b81b018ad684f3a35fee301741b2734c8f4 --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.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/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/.name" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/.name" new file mode 100644 index 0000000000000000000000000000000000000000..b38808ab0e3a83f662f55ffdbd06c9b3f3837b13 --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/.name" @@ -0,0 +1 @@ +IOC \ No newline at end of file diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/compiler.xml" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/compiler.xml" new file mode 100644 index 0000000000000000000000000000000000000000..b0d29098c3e3e9ec84719bb8d8e231a673978e04 --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/compiler.xml" @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/inspectionProfiles/Project_Default.xml" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/inspectionProfiles/Project_Default.xml" new file mode 100644 index 0000000000000000000000000000000000000000..6560a98983ec708cf9d8b5c5c3776d7bd39c475b --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/inspectionProfiles/Project_Default.xml" @@ -0,0 +1,36 @@ + + + + \ No newline at end of file diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/jarRepositories.xml" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/jarRepositories.xml" new file mode 100644 index 0000000000000000000000000000000000000000..980588c7f2720e4a734966089f292ec94e53aec6 --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/jarRepositories.xml" @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/misc.xml" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/misc.xml" new file mode 100644 index 0000000000000000000000000000000000000000..fe1451cbfe436d946d8dd3385201120748cf7a9f --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/misc.xml" @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/runConfigurations.xml" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/runConfigurations.xml" new file mode 100644 index 0000000000000000000000000000000000000000..797acea53eb091cf5b30518802c3073f544adeed --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/.idea/runConfigurations.xml" @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/pom.xml" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/pom.xml" new file mode 100644 index 0000000000000000000000000000000000000000..46851a1ca2407c58352cee6fd7063d9a8578c73b --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/pom.xml" @@ -0,0 +1,29 @@ + + + 4.0.0 + + org.example + IOC + 1.0-SNAPSHOT + + + junit + junit + 4.13.2 + compile + + + org.springframework + spring-context + 5.3.19 + + + + + 8 + 8 + + + \ No newline at end of file diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/java/com/xju/edu/bean/Cat.java" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/java/com/xju/edu/bean/Cat.java" new file mode 100644 index 0000000000000000000000000000000000000000..3e6aa0e3b6b95b64229e9f81d2083a6e47f9d98d --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/java/com/xju/edu/bean/Cat.java" @@ -0,0 +1,7 @@ +package com.xj.edu.bean; + +public class Cat { + public void test(){ + System.out.println("测试猫类"); + } +} diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/java/com/xju/edu/bean/Dog.java" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/java/com/xju/edu/bean/Dog.java" new file mode 100644 index 0000000000000000000000000000000000000000..e4e6711fb73f73319e503d2bbe2351ecb68b6de7 --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/java/com/xju/edu/bean/Dog.java" @@ -0,0 +1,7 @@ +package com.xj.edu.bean; + +public class Dog { + public void test(){ + System.out.println("测试狗类"); + } +} diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/java/com/xju/edu/bean/UserBean.java" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/java/com/xju/edu/bean/UserBean.java" new file mode 100644 index 0000000000000000000000000000000000000000..41eb5c891ed3f0bf5ed8e8034d02dae6d714fcee --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/java/com/xju/edu/bean/UserBean.java" @@ -0,0 +1,24 @@ +package com.xj.edu.bean; + +public class UserBean { + private String username; + private String password; + private Cat cat; + private Dog dog; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } +} diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/java/com/xju/edu/test/TestIOC.java" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/java/com/xju/edu/test/TestIOC.java" new file mode 100644 index 0000000000000000000000000000000000000000..ba7f24fa9bbf5f5c0ab771a74165925b69832024 --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/java/com/xju/edu/test/TestIOC.java" @@ -0,0 +1,26 @@ +package com.xj.edu.test; + +import com.xj.edu.bean.UserBean; +import org.junit.Test; +import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +public class TestIOC { + @Test + public void test01(){ + ApplicationContext ac = + new ClassPathXmlApplicationContext("applicationContext.xml"); + UserBean userBean = (UserBean) ac.getBean("user"); + System.out.println(userBean); + ((ClassPathXmlApplicationContext)ac).close(); + } + + @Test + public void test02(){ + ApplicationContext ac = + new ClassPathXmlApplicationContext("applicationContext.xml"); + UserBean userBean = (UserBean) ac.getBean("user1"); + System.out.println(userBean); + ((ClassPathXmlApplicationContext)ac).close(); + } +} diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/resources/applicationContext.xml" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/resources/applicationContext.xml" new file mode 100644 index 0000000000000000000000000000000000000000..fd8dd6d9ac3cc997c9fd61303348657cf9064e83 --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/src/main/resources/applicationContext.xml" @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/applicationContext.xml" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/applicationContext.xml" new file mode 100644 index 0000000000000000000000000000000000000000..fd8dd6d9ac3cc997c9fd61303348657cf9064e83 --- /dev/null +++ "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/applicationContext.xml" @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/com/xj/edu/bean/Cat.class" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/com/xj/edu/bean/Cat.class" new file mode 100644 index 0000000000000000000000000000000000000000..60586a75aa125f9968b53890baffe0179878b1de Binary files /dev/null and "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/com/xj/edu/bean/Cat.class" differ diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/com/xj/edu/bean/Dog.class" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/com/xj/edu/bean/Dog.class" new file mode 100644 index 0000000000000000000000000000000000000000..724e5461fe981bbb43167a09158ce0d110dd92b8 Binary files /dev/null and "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/com/xj/edu/bean/Dog.class" differ diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/com/xj/edu/bean/UserBean.class" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/com/xj/edu/bean/UserBean.class" new file mode 100644 index 0000000000000000000000000000000000000000..d79cc3a88ad1b09f91f0f8d721e57c0e2b66551f Binary files /dev/null and "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/com/xj/edu/bean/UserBean.class" differ diff --git "a/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/com/xj/edu/test/TestIOC.class" "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/com/xj/edu/test/TestIOC.class" new file mode 100644 index 0000000000000000000000000000000000000000..64a448fc05889a13e54c4e79e3a6062257a17130 Binary files /dev/null and "b/2\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/IOC/target/classes/com/xj/edu/test/TestIOC.class" differ diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/.gitignore" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..13566b81b018ad684f3a35fee301741b2734c8f4 --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.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/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/compiler.xml" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/compiler.xml" new file mode 100644 index 0000000000000000000000000000000000000000..94efc2d9c4a836e70d9cdcd4044e49ba0d789e5f --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/compiler.xml" @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/encodings.xml" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/encodings.xml" new file mode 100644 index 0000000000000000000000000000000000000000..aa00ffab7828f4818589659c804ec2cfd99baed3 --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/encodings.xml" @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/inspectionProfiles/Project_Default.xml" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/inspectionProfiles/Project_Default.xml" new file mode 100644 index 0000000000000000000000000000000000000000..6560a98983ec708cf9d8b5c5c3776d7bd39c475b --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/inspectionProfiles/Project_Default.xml" @@ -0,0 +1,36 @@ + + + + \ No newline at end of file diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/jarRepositories.xml" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/jarRepositories.xml" new file mode 100644 index 0000000000000000000000000000000000000000..355e23773a921d03bf96e5c31303a58a64139e60 --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/jarRepositories.xml" @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/misc.xml" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/misc.xml" new file mode 100644 index 0000000000000000000000000000000000000000..79a352f1e92a127a65b42ab6185343abcbe656e0 --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/misc.xml" @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/runConfigurations.xml" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/runConfigurations.xml" new file mode 100644 index 0000000000000000000000000000000000000000..797acea53eb091cf5b30518802c3073f544adeed --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/.idea/runConfigurations.xml" @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/pom.xml" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/pom.xml" new file mode 100644 index 0000000000000000000000000000000000000000..593e4151a79d0102f8ef19dafa33d73de5bfa7db --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/pom.xml" @@ -0,0 +1,82 @@ + + + + 4.0.0 + + org.example + work_2 + 1.0-SNAPSHOT + war + + work_2 Maven Webapp + + http://www.example.com + + + UTF-8 + 1.7 + 1.7 + + + + + junit + junit + 4.11 + test + + + + org.springframework + spring-beans + 5.3.18 + + + org.springframework + spring-context + 5.3.18 + + + junit + junit + 4.12 + + + + + work_2 + + + + maven-clean-plugin + 3.1.0 + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-war-plugin + 3.2.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + + diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/java/com/xju/edu/Demo.java" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/java/com/xju/edu/Demo.java" new file mode 100644 index 0000000000000000000000000000000000000000..a6458f6094bd9db16f755ececf0ca41a6b57e498 --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/java/com/xju/edu/Demo.java" @@ -0,0 +1,90 @@ +package com.xju.edu; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Set; + + +@Component +public class Demo { + @Value("${uname}") + private String name; + @Value("${uage}") + private int age; + @Value("#{@list1}") + private List list; + @Value("#{@set1}") + private Set set; + @Value("#{@map1}") + private Map map; + @Value("#{@properties1}") + private Properties properties; + /*设置引用类型:DI注入*/ + // @Autowired 实现自动装配的注解,可以完成自定义bean类型属性的注入 + // 说明:先按照类型进行匹配,如果找到唯一的就注入 + // 如果找不到,就按照id进行注入,如果都找不到,抛出异常 + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + + public Set getSet() { + return set; + } + + public void setSet(Set set) { + this.set = set; + } + + public Map getMap() { + return map; + } + + public void setMap(Map map) { + this.map = map; + } + + public Properties getProperties() { + return properties; + } + + public void setProperties(Properties properties) { + this.properties = properties; + } + + @Override + public String toString() { + return "Demo{" + + "name='" + name + '\'' + + ", age=" + age + + ", list=" + list + + ", set=" + set + + ", map=" + map + + ", properties=" + properties + + '}'; + } +} diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/java/com/xju/edu/TestDemo.java" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/java/com/xju/edu/TestDemo.java" new file mode 100644 index 0000000000000000000000000000000000000000..98f8a05ec891fdfeca0033213b94a28d6093b9ef --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/java/com/xju/edu/TestDemo.java" @@ -0,0 +1,18 @@ +package com.xju.edu; + +import org.junit.Test; +import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +import java.io.IOException; + +public class TestDemo { + @Test + public void test01() throws IOException { + + ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml"); + Demo demo = (Demo) ac.getBean("demo"); + System.out.println(demo); + ((ClassPathXmlApplicationContext) ac).close(); + } +} diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/resources/applicationContext.xml" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/resources/applicationContext.xml" new file mode 100644 index 0000000000000000000000000000000000000000..ee62f36311f0a097216afb0e77136b658d441378 --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/resources/applicationContext.xml" @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + v1 + v2 + v3 + + + s1 + s2 + s3 + + + + + + + + + p1 + p2 + p1 + + + + + + + diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/resources/demo.properties" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/resources/demo.properties" new file mode 100644 index 0000000000000000000000000000000000000000..4cd13d5842bc2a33e6fcf9b8c82ec42178d87e6b --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/resources/demo.properties" @@ -0,0 +1,2 @@ +uname='lzj' +uage=20 \ No newline at end of file diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/webapp/WEB-INF/web.xml" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/webapp/WEB-INF/web.xml" new file mode 100644 index 0000000000000000000000000000000000000000..9f88c1f9632445500e3b3688fe477b860f77d8f2 --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/webapp/WEB-INF/web.xml" @@ -0,0 +1,7 @@ + + + + Archetype Created Web Application + diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/webapp/index.jsp" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/webapp/index.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..c38169bb958579c635a5c09ee2f379cc5956c0c2 --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/src/main/webapp/index.jsp" @@ -0,0 +1,5 @@ + + +

Hello World!

+ + diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/target/classes/applicationContext.xml" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/target/classes/applicationContext.xml" new file mode 100644 index 0000000000000000000000000000000000000000..ee62f36311f0a097216afb0e77136b658d441378 --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/target/classes/applicationContext.xml" @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + v1 + v2 + v3 + + + s1 + s2 + s3 + + + + + + + + + p1 + p2 + p1 + + + + + + + diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/target/classes/com/xju/edu/Demo.class" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/target/classes/com/xju/edu/Demo.class" new file mode 100644 index 0000000000000000000000000000000000000000..24ad70246c4aa776e27004a249eae84fcfad68f1 Binary files /dev/null and "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/target/classes/com/xju/edu/Demo.class" differ diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/target/classes/com/xju/edu/TestDemo.class" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/target/classes/com/xju/edu/TestDemo.class" new file mode 100644 index 0000000000000000000000000000000000000000..5da4b8b38d5a00d2c847b5eacc65baf9fea8cb76 Binary files /dev/null and "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/target/classes/com/xju/edu/TestDemo.class" differ diff --git "a/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/target/classes/demo.properties" "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/target/classes/demo.properties" new file mode 100644 index 0000000000000000000000000000000000000000..4cd13d5842bc2a33e6fcf9b8c82ec42178d87e6b --- /dev/null +++ "b/3\344\275\234\344\270\232-20202501420-\345\210\230\350\265\265\346\235\260/DI/target/classes/demo.properties" @@ -0,0 +1,2 @@ +uname='lzj' +uage=20 \ No newline at end of file