diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/controller/CourseController.class b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/controller/CourseController.class
index f1385a6..f5e68fb 100644
Binary files a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/controller/CourseController.class and b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/controller/CourseController.class differ
diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/service/CourseService.class b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/service/CourseService.class
index 4e09fcb..4e6389c 100644
Binary files a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/service/CourseService.class and b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/service/CourseService.class differ
diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/mybatis-config.xml b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/mybatis-config.xml
index b0b0060..fa3bc53 100644
--- a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/mybatis-config.xml
+++ b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/mybatis-config.xml
@@ -12,6 +12,7 @@
+
diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/views/courseList.jsp b/project2/out/artifacts/project2_war_exploded/WEB-INF/views/courseList.jsp
index 11a7227..f061e22 100644
--- a/project2/out/artifacts/project2_war_exploded/WEB-INF/views/courseList.jsp
+++ b/project2/out/artifacts/project2_war_exploded/WEB-INF/views/courseList.jsp
@@ -143,9 +143,9 @@
- ${course.CourseID} |
- ${course.CourseName} |
- ${course.Description} |
+ ${course.courseID} |
+ ${course.courseName} |
+ ${course.description} |
diff --git a/project2/src/main/java/cyou/chenx221/controller/CourseController.java b/project2/src/main/java/cyou/chenx221/controller/CourseController.java
index 0b25897..5146f14 100644
--- a/project2/src/main/java/cyou/chenx221/controller/CourseController.java
+++ b/project2/src/main/java/cyou/chenx221/controller/CourseController.java
@@ -2,6 +2,7 @@ package cyou.chenx221.controller;
import cyou.chenx221.pojo.Course;
import cyou.chenx221.service.CourseService;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@@ -14,6 +15,7 @@ import java.util.List;
public class CourseController {
private final CourseService courseService;
+ @Autowired
public CourseController(CourseService courseService) {
this.courseService = courseService;
}
diff --git a/project2/src/main/java/cyou/chenx221/service/CourseService.java b/project2/src/main/java/cyou/chenx221/service/CourseService.java
index 2046923..c34cc88 100644
--- a/project2/src/main/java/cyou/chenx221/service/CourseService.java
+++ b/project2/src/main/java/cyou/chenx221/service/CourseService.java
@@ -1,6 +1,7 @@
package cyou.chenx221.service;
import cyou.chenx221.mapper.CourseDao;
+import cyou.chenx221.mapper.StudentDao;
import cyou.chenx221.pojo.Course;
import org.springframework.stereotype.Service;
@@ -10,6 +11,11 @@ import java.util.List;
public class CourseService {
private CourseDao courseDao;
+ public CourseService(CourseDao courseDao) {
+ this.courseDao = courseDao;
+ }
+
+
public List getAllCourses() {
return courseDao.getAllCourses();
}
diff --git a/project2/src/main/resources/mybatis-config.xml b/project2/src/main/resources/mybatis-config.xml
index 56c0ca3..fa3bc53 100644
--- a/project2/src/main/resources/mybatis-config.xml
+++ b/project2/src/main/resources/mybatis-config.xml
@@ -12,7 +12,7 @@
-
diff --git a/project2/web/WEB-INF/views/courseList.jsp b/project2/web/WEB-INF/views/courseList.jsp
index 11a7227..f061e22 100644
--- a/project2/web/WEB-INF/views/courseList.jsp
+++ b/project2/web/WEB-INF/views/courseList.jsp
@@ -143,9 +143,9 @@
- ${course.CourseID} |
- ${course.CourseName} |
- ${course.Description} |
+ ${course.courseID} |
+ ${course.courseName} |
+ ${course.description} |