diff --git a/.idea/libraries/lib.xml b/.idea/libraries/lib.xml index 77f6baf..a5b5a9d 100644 --- a/.idea/libraries/lib.xml +++ b/.idea/libraries/lib.xml @@ -19,6 +19,7 @@ + diff --git a/SpingProject0222/.gitignore b/SpingProject0222/.gitignore deleted file mode 100644 index f68d109..0000000 --- a/SpingProject0222/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -### IntelliJ IDEA ### -out/ -!**/src/main/**/out/ -!**/src/test/**/out/ - -### Eclipse ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache -bin/ -!**/src/main/**/bin/ -!**/src/test/**/bin/ - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ - -### VS Code ### -.vscode/ - -### Mac OS ### -.DS_Store \ No newline at end of file diff --git a/SpingProject0222/SpingProject0222.iml b/SpingProject0222/SpingProject0222.iml deleted file mode 100644 index 38a4178..0000000 --- a/SpingProject0222/SpingProject0222.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/SpingProject0222/src/bean-first.xml b/SpingProject0222/src/bean-first.xml deleted file mode 100644 index 142def2..0000000 --- a/SpingProject0222/src/bean-first.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/SpingProject0222/src/com/ssm/di/annotation/Category.java b/SpingProject0222/src/com/ssm/di/annotation/Category.java deleted file mode 100644 index f8d950a..0000000 --- a/SpingProject0222/src/com/ssm/di/annotation/Category.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.ssm.di.annotation; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -// 标记这个类交给Spring管理,id默认是category -@Component -public class Category { - // 专业ID - @Value("1") - private Integer cid; - // 专业名称 - @Value("软件工程") - private String cname; - // 专业介绍(可选,可根据课程需求调整) - @Value("培养软件开发、系统设计方向的应用型人才") - private String description; - - // 无参构造(Spring必须) - public Category() {} - - // Getter/Setter(Spring注入需要) - public Integer getCid() { return cid; } - public void setCid(Integer cid) { this.cid = cid; } - public String getCname() { return cname; } - public void setCname(String cname) { this.cname = cname; } - public String getDescription() { return description; } - public void setDescription(String description) { this.description = description; } - - // 打印信息用 - @Override - public String toString() { - return "专业信息{" + - "专业ID=" + cid + - ", 专业名称='" + cname + '\'' + - ", 专业介绍='" + description + '\'' + - '}'; - } -} \ No newline at end of file diff --git a/SpingProject0222/src/com/ssm/di/annotation/annotation/Category.java b/SpingProject0222/src/com/ssm/di/annotation/annotation/Category.java deleted file mode 100644 index b7d19a8..0000000 --- a/SpingProject0222/src/com/ssm/di/annotation/annotation/Category.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.ssm.di.annotation.annotation; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -@Component -public class Category { - @Value("1") - private Integer cid; - @Value("蔬菜") - private String cname; - - @Override - public String toString() { - return "Category{cid=" + cid + ", cname='" + cname + "'}"; - } -} \ No newline at end of file diff --git a/SpingProject0222/src/com/ssm/di/annotation/annotation/Product.java b/SpingProject0222/src/com/ssm/di/annotation/annotation/Product.java deleted file mode 100644 index ed210de..0000000 --- a/SpingProject0222/src/com/ssm/di/annotation/annotation/Product.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.ssm.di.annotation.annotation; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -@Component -public class Product { - @Value("2") - private Integer pid; - @Value("荷兰豆") - private String pname; - @Value("12.9") - private Double marketPrice; - @Value("12.0") - private Double shopPrice; - @Value("products/f4c77d4e-57ca-4f95-8b03") - private String image; - - // 必须重写 toString() 才能输出截图中的格式 - @Override - public String toString() { - return "Product{" + - "pid=" + pid + - ", pname='" + pname + '\'' + - ", marketPrice=" + marketPrice + - ", shopPrice=" + shopPrice + - ", image='" + image + '\'' + - '}'; - } -} \ No newline at end of file diff --git a/SpingProject0222/src/com/ssm/di/annotation/annotation/SpringConfig.java b/SpingProject0222/src/com/ssm/di/annotation/annotation/SpringConfig.java deleted file mode 100644 index f6c6ec6..0000000 --- a/SpingProject0222/src/com/ssm/di/annotation/annotation/SpringConfig.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.ssm.di.annotation.annotation; - -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; - -@Configuration -@ComponentScan("com.ssm.di.annotation") -public class SpringConfig { -} \ No newline at end of file diff --git a/SpingProject0222/src/com/ssm/di/annotation/annotation/Test.java b/SpingProject0222/src/com/ssm/di/annotation/annotation/Test.java deleted file mode 100644 index 27a8b40..0000000 --- a/SpingProject0222/src/com/ssm/di/annotation/annotation/Test.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.ssm.di.annotation.annotation; - -import com.ssm.di.annotation.Category; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.AnnotationConfigApplicationContext; - -public class Test { - public static void main(String[] args) { - ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class); - com.ssm.di.annotation.Category category = context.getBean(Category.class); - System.out.println(category); - } -} \ No newline at end of file diff --git a/SpingProject0222/src/com/ssm/first/FirstTest.java b/SpingProject0222/src/com/ssm/first/FirstTest.java deleted file mode 100644 index 8be88ba..0000000 --- a/SpingProject0222/src/com/ssm/first/FirstTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.ssm.first; - -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -public class FirstTest { - public static void main(String[] args) { - //初始化Sping容器,加载配置文件 - ApplicationContext ac=new ClassPathXmlApplicationContext("bean-first.xml"); - System.out.printf("Hello Sping!"); - } -} \ No newline at end of file diff --git a/SpingProject0222/src/libs/commons-logging-1.1.1.jar b/SpingProject0222/src/libs/commons-logging-1.1.1.jar deleted file mode 100644 index 8758a96..0000000 Binary files a/SpingProject0222/src/libs/commons-logging-1.1.1.jar and /dev/null differ diff --git a/SpingProject0222/src/libs/spring-beans-5.1.6.RELEASE.jar b/SpingProject0222/src/libs/spring-beans-5.1.6.RELEASE.jar deleted file mode 100644 index 39813b2..0000000 Binary files a/SpingProject0222/src/libs/spring-beans-5.1.6.RELEASE.jar and /dev/null differ diff --git a/SpingProject0222/src/libs/spring-context-5.1.6.RELEASE.jar b/SpingProject0222/src/libs/spring-context-5.1.6.RELEASE.jar deleted file mode 100644 index 5165820..0000000 Binary files a/SpingProject0222/src/libs/spring-context-5.1.6.RELEASE.jar and /dev/null differ diff --git a/SpingProject0222/src/libs/spring-core-5.1.6.RELEASE.jar b/SpingProject0222/src/libs/spring-core-5.1.6.RELEASE.jar deleted file mode 100644 index 5522cf3..0000000 Binary files a/SpingProject0222/src/libs/spring-core-5.1.6.RELEASE.jar and /dev/null differ diff --git a/SpingProject0222/src/libs/spring-expression-5.1.6.RELEASE.jar b/SpingProject0222/src/libs/spring-expression-5.1.6.RELEASE.jar deleted file mode 100644 index cdc7956..0000000 Binary files a/SpingProject0222/src/libs/spring-expression-5.1.6.RELEASE.jar and /dev/null differ diff --git a/grademanagement-SpringProject/out/bean-ioc.xml b/grademanagement-SpringProject/out/bean-ioc.xml index fbddeff..8012b38 100644 --- a/grademanagement-SpringProject/out/bean-ioc.xml +++ b/grademanagement-SpringProject/out/bean-ioc.xml @@ -56,19 +56,19 @@ - - - - + + + + - - - - + + + + \ No newline at end of file diff --git a/grademanagement-SpringProject/src/bean-ioc.xml b/grademanagement-SpringProject/src/bean-ioc.xml index f43e8b7..05e8d2c 100644 --- a/grademanagement-SpringProject/src/bean-ioc.xml +++ b/grademanagement-SpringProject/src/bean-ioc.xml @@ -59,7 +59,17 @@ - + + + + + + + + + + +