diff --git a/.idea/misc.xml b/.idea/misc.xml index 01c24a3..1dab215 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,6 +5,7 @@ diff --git a/Readme.md b/Readme.md index cfe8a38..6b25699 100644 --- a/Readme.md +++ b/Readme.md @@ -33,3 +33,6 @@ 4. 删除某个人某条成绩 ##### 选做内容 1. 查询某人成绩同时计算平均分 + +### 更新内容 +1. 2024-10-20: 更新化简项目后,残留的cookie \ No newline at end of file diff --git a/SimpleStudentManagementSystem/src/main/java/edu/maxxie/controller/StudentController.java b/SimpleStudentManagementSystem/src/main/java/edu/maxxie/controller/StudentController.java index 12ecfee..78f3239 100644 --- a/SimpleStudentManagementSystem/src/main/java/edu/maxxie/controller/StudentController.java +++ b/SimpleStudentManagementSystem/src/main/java/edu/maxxie/controller/StudentController.java @@ -24,11 +24,9 @@ public class StudentController { public String getStudentPage(){ return "student"; } + @GetMapping("addstudentpage") - public String addStudentPage(@CookieValue(value = "username")String username, Model model){ - Account account = new Account(); - account.setAccount(username); - model.addAttribute("account",account); + public String addStudentPage(){ return "addstudent"; } // 处理数据 diff --git a/SimpleStudentManagementSystem/src/main/resources/application.properties b/SimpleStudentManagementSystem/src/main/resources/application.properties index fffec34..e1a2d94 100644 --- a/SimpleStudentManagementSystem/src/main/resources/application.properties +++ b/SimpleStudentManagementSystem/src/main/resources/application.properties @@ -1,33 +1,22 @@ spring.application.name=SimpleStudentManagementSystem -#热部署生效 spring.devtools.restart.enabled=true -#设置重启目录 spring.devtools.restart.additional-paths=src/main/java -# 指定时区 避免因时区差异而导致的日期时间解析错误 spring.jackson.time-zone=Asia/Shanghai -#设置 cLasspath 目录下的WEB-INF文件夹内容修改不重启(有静态资源才需要)(需要修改成对应值) spring.devtools.restart.exclude=static/** -# 数据库驱动 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver -# 数据库链接(需要修改成对应值) spring.datasource.url=jdbc:mysql://localhost:3306/mybatis -# 数据库账号(需要修改成对应值) spring.datasource.username=root -# 数据库密码(需要修改成对应值) spring.datasource.password=123456 -# 配置 mybatis 的日志,指定输出到控制台 mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl -# 开启 mybatis 的驼峰命名自动映射开关 mybatis.configuration.map-underscore-to-camel-case=true -# 配置 mybatis 的映射文件路径 + mybatis.mapper-locations=classpath*:mapper/*.xml -# 自动为包下所有Java类注册类型别名(需要修改成对应值) mybatis.type-aliases-package=edu.maxxie.pojo -# 启用事务管理 + spring.transaction.annotation-proxy-target-class=true -# Thymeleaf 配置 + server.port=8080 server.servlet.context-path=/ spring.thymeleaf.cache=false