From d5c0d1663119a519479e72d01d0714da469d8e9b Mon Sep 17 00:00:00 2001 From: 7wc98#14 <2923616405@qq.com> Date: Mon, 1 Feb 2021 10:01:34 +0800 Subject: [PATCH] commit --- pom.xml | 10 + .../com/pyc/campus/chat/ChatController.java | 2 +- .../pyc/campus/config/WebSecurityConfig.java | 1 + .../controller/FriendListController.java | 2 +- .../pyc/campus/controller/WebController.java | 9 +- .../templates/page/AboutEnglish.html | 17 +- .../resources/templates/page/AboutLearn.html | 16 +- .../resources/templates/page/AboutMath.html | 14 +- .../templates/page/AboutPhilosophy.html | 14 +- .../resources/templates/page/AddFriend.html | 22 +- .../resources/templates/page/AdminPage.html | 19 +- .../templates/page/BrowseFriendInfo.html | 19 +- .../resources/templates/page/BrowseNews.html | 19 +- .../templates/page/BrowserQuestion.html | 19 +- .../resources/templates/page/ChangePWD.html | 19 +- .../resources/templates/page/CheckFrozen.html | 195 ------------------ .../templates/page/CheckPassword.html | 13 +- .../resources/templates/page/English.html | 11 +- .../resources/templates/page/FeedBack.html | 22 +- src/main/resources/templates/page/Help.html | 22 +- src/main/resources/templates/page/Home.html | 10 +- .../resources/templates/page/ImportGrade.html | 20 +- src/main/resources/templates/page/Index.html | 19 +- src/main/resources/templates/page/Learn.html | 11 +- src/main/resources/templates/page/Login.html | 10 +- .../resources/templates/page/ManageUser.html | 20 +- src/main/resources/templates/page/Math.html | 11 +- .../resources/templates/page/MyFriend.html | 23 +-- .../resources/templates/page/Philosophy.html | 11 +- .../resources/templates/page/PrivateChat.html | 26 +-- .../resources/templates/page/PublishNews.html | 21 +- .../templates/page/PublishQuestion.html | 21 +- .../resources/templates/page/QueryGrade.html | 21 +- src/main/resources/templates/page/Sign.html | 13 +- .../resources/templates/page/UpQuestion.html | 21 +- .../templates/page/UpdateUserInfo.html | 24 ++- .../resources/templates/page/UserCenter.html | 20 +- .../templates/page/VerifyFriend.html | 22 +- 38 files changed, 187 insertions(+), 602 deletions(-) delete mode 100644 src/main/resources/templates/page/CheckFrozen.html diff --git a/pom.xml b/pom.xml index f4cece8..0dffe30 100644 --- a/pom.xml +++ b/pom.xml @@ -19,6 +19,16 @@ 1.8 + + org.webjars + bootstrap + 3.3.0 + + + org.webjars + jquery + 3.3.0 + org.springframework.boot spring-boot-devtools diff --git a/src/main/java/com/pyc/campus/chat/ChatController.java b/src/main/java/com/pyc/campus/chat/ChatController.java index a702e64..05b7b6e 100644 --- a/src/main/java/com/pyc/campus/chat/ChatController.java +++ b/src/main/java/com/pyc/campus/chat/ChatController.java @@ -38,7 +38,7 @@ public class ChatController { @RequestMapping("/publicChatRoom") public String publicChatRoom(Model model, HttpSession session){ - log.info("由用户进入公共聊天室...."); + log.info("有用户进入公共聊天室...."); SecurityContextImpl securityContext = (SecurityContextImpl)session.getAttribute("SPRING_SECURITY_CONTEXT"); String currentStudentId = ((UserDetails) securityContext.getAuthentication().getPrincipal()).getUsername(); Student s = studentRepository.findNameByStudentID(currentStudentId); diff --git a/src/main/java/com/pyc/campus/config/WebSecurityConfig.java b/src/main/java/com/pyc/campus/config/WebSecurityConfig.java index 12b82dd..2c77e62 100644 --- a/src/main/java/com/pyc/campus/config/WebSecurityConfig.java +++ b/src/main/java/com/pyc/campus/config/WebSecurityConfig.java @@ -51,6 +51,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { .antMatchers("/static/**/**/**").permitAll() .antMatchers("/static/**/**.**").permitAll() .antMatchers("/static/**/**.**.**").permitAll() + .antMatchers("/webjars/**").permitAll() .antMatchers("/images/**/**").permitAll() .anyRequest().authenticated() .and().formLogin() diff --git a/src/main/java/com/pyc/campus/controller/FriendListController.java b/src/main/java/com/pyc/campus/controller/FriendListController.java index 3fee50e..0bb76c5 100644 --- a/src/main/java/com/pyc/campus/controller/FriendListController.java +++ b/src/main/java/com/pyc/campus/controller/FriendListController.java @@ -119,7 +119,7 @@ public class FriendListController { SecurityContextImpl securityContext = (SecurityContextImpl)session.getAttribute("SPRING_SECURITY_CONTEXT"); String currentStudentId = ((UserDetails) securityContext.getAuthentication().getPrincipal()).getUsername(); - log.info(currentStudentId + "发起与" + toName + "的私聊...."); + log.info(currentStudentId + ",发起与" + toName + ",的私聊...."); Student toUse = studentRepository.findNameByStudentID(toName); model.addAttribute("curUser", toUse); boolean s; diff --git a/src/main/java/com/pyc/campus/controller/WebController.java b/src/main/java/com/pyc/campus/controller/WebController.java index 4c5d309..f9dd14f 100644 --- a/src/main/java/com/pyc/campus/controller/WebController.java +++ b/src/main/java/com/pyc/campus/controller/WebController.java @@ -185,13 +185,10 @@ public class WebController { return "page/Sign"; } - /*@RequestMapping("/login") - public String login(Model model) { - Msg msg = new Msg("欢迎登录","请输入你的注册学号和对应的密码,先进行密码校验方能进行登陆",""); - model.addAttribute("key", false); - model.addAttribute("msg",msg); + @RequestMapping("/login") + public String login() { return "page/Login"; - }*/ + } /*@RequestMapping("/toCheckFrozen") public String toCheckFrozen(Model model) { diff --git a/src/main/resources/templates/page/AboutEnglish.html b/src/main/resources/templates/page/AboutEnglish.html index 08960b4..a501076 100644 --- a/src/main/resources/templates/page/AboutEnglish.html +++ b/src/main/resources/templates/page/AboutEnglish.html @@ -3,11 +3,15 @@ 学习资源 - - + + - - + + + + + + - \ No newline at end of file diff --git a/src/main/resources/templates/page/AboutLearn.html b/src/main/resources/templates/page/AboutLearn.html index ed9474d..0db34bf 100644 --- a/src/main/resources/templates/page/AboutLearn.html +++ b/src/main/resources/templates/page/AboutLearn.html @@ -3,11 +3,15 @@ 学习资源 - - + + + + + - - \ No newline at end of file diff --git a/src/main/resources/templates/page/AboutMath.html b/src/main/resources/templates/page/AboutMath.html index 3a07450..a1b94d2 100644 --- a/src/main/resources/templates/page/AboutMath.html +++ b/src/main/resources/templates/page/AboutMath.html @@ -3,11 +3,11 @@ 学习资源 - - - - + + + + - - \ No newline at end of file diff --git a/src/main/resources/templates/page/AboutPhilosophy.html b/src/main/resources/templates/page/AboutPhilosophy.html index 7b0982a..68ffaf0 100644 --- a/src/main/resources/templates/page/AboutPhilosophy.html +++ b/src/main/resources/templates/page/AboutPhilosophy.html @@ -3,11 +3,11 @@ 学习资源 - - - - + + + + - - \ No newline at end of file diff --git a/src/main/resources/templates/page/AddFriend.html b/src/main/resources/templates/page/AddFriend.html index e45abfb..b31570d 100644 --- a/src/main/resources/templates/page/AddFriend.html +++ b/src/main/resources/templates/page/AddFriend.html @@ -5,20 +5,11 @@ 添加好友 - - - - - - - - - - + + + + + - - \ No newline at end of file diff --git a/src/main/resources/templates/page/AdminPage.html b/src/main/resources/templates/page/AdminPage.html index fc40eee..7ab8540 100644 --- a/src/main/resources/templates/page/AdminPage.html +++ b/src/main/resources/templates/page/AdminPage.html @@ -6,19 +6,10 @@ 网站管理 - - - - - - - - - + + + + - \ No newline at end of file diff --git a/src/main/resources/templates/page/BrowseFriendInfo.html b/src/main/resources/templates/page/BrowseFriendInfo.html index 06c511f..18adb50 100644 --- a/src/main/resources/templates/page/BrowseFriendInfo.html +++ b/src/main/resources/templates/page/BrowseFriendInfo.html @@ -6,19 +6,10 @@ 查看好友信息 - - - - - - - - - + + + + - \ No newline at end of file diff --git a/src/main/resources/templates/page/BrowseNews.html b/src/main/resources/templates/page/BrowseNews.html index 34f22a6..136f57e 100644 --- a/src/main/resources/templates/page/BrowseNews.html +++ b/src/main/resources/templates/page/BrowseNews.html @@ -6,18 +6,10 @@ 新闻浏览 - - - - - - - - + + + + - - \ No newline at end of file diff --git a/src/main/resources/templates/page/BrowserQuestion.html b/src/main/resources/templates/page/BrowserQuestion.html index 0e9d100..7ea96c2 100644 --- a/src/main/resources/templates/page/BrowserQuestion.html +++ b/src/main/resources/templates/page/BrowserQuestion.html @@ -6,19 +6,10 @@ 悬赏问题浏览 - - - - - - - - - + + + + - \ No newline at end of file diff --git a/src/main/resources/templates/page/ChangePWD.html b/src/main/resources/templates/page/ChangePWD.html index 3897164..06d8bbe 100644 --- a/src/main/resources/templates/page/ChangePWD.html +++ b/src/main/resources/templates/page/ChangePWD.html @@ -3,20 +3,11 @@ 修改密码 - - - - - - - - + + + + + - - -
-

有错误,请重试!

-
-

-

-
-
-
- @ - -
-
-
- - - -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/main/resources/templates/page/CheckPassword.html b/src/main/resources/templates/page/CheckPassword.html index ad01dd2..9df1792 100644 --- a/src/main/resources/templates/page/CheckPassword.html +++ b/src/main/resources/templates/page/CheckPassword.html @@ -3,14 +3,11 @@ 登录 - - - - - - - - + + + + +