• 基于springboot的社区流浪动物救助管理系统(前端+后端)


    一、系统简介

     


    本项目采用idea工具开发,html+springboot+mybatis+jquery+thymeleaf技术编写,数据库采用的是mysql,navicat开发工具。

    系统一共分为2个角色分别是:管理员,用户

    二、模块简介

    管理员

    1、登录

    2、个人信息管理

    3、用户管理

    4、动物类别管理

    5、帖子管理

    6、动物管理

    7、公告管理

    8、动物领养管理

    9、动物捐赠管理

    10、评论管理

    11、退出

    用户

    1、登录注册

    2、浏览动物网站

    3、查看动物详情

    4、爱心捐赠

    5、查看公告

    6、发布帖子

    7、查看帖子详情

    8、评论帖子信息

    9、个人信息管理

    10、申请领养宠物

    11、历史记录查询

    项目简介:
    难度等级:✩✩✩
    用户类型:2角色( 管理员,用户)
    设计模式:MVC
    项目架构:B/S架构
    开发语言:Java语言
    前端技术:bootstrap+HTML、CSS、JS、JQuery、thymeleaf等
    后端技术:springboot+mybatis框架
    运行环境:Windows7或10、JDK1.8
    运行工具:本系统采用idea开发,仅支持idea运行,不支持MyEclipse和eclipse运行,因为三者的骨架不一样,强行导入打开运行可能会导致出现未知的错误。
    数  据  库:MySQL5.5/5.7/8.0版本
    是否基于Maven环境:是
    是否采用框架:是
    数据库表数量:9张表
    JSP页面数量:30多张
    是否有分页:有分页

    相关截图

     

    相关代码

    登录

    1. html>
    2. <html lang="en" xmlns:th="http://www.thymeleaf.org">
    3. <head>
    4. <meta charset="UTF-8">
    5. <title>登录title>
    6. <link rel="icon" th:href="@{/public/favicon.ico}" type="image/x-icon"/>
    7. <link rel="bookmark" th:href="@{/public/favicon.ico}" type="image/x-icon"/>
    8. <link rel="stylesheet" type="text/css" th:href="@{/css/bootstrap.css}">
    9. <link rel="stylesheet" type="text/css" th:href="@{/css/back.css}">
    10. <link rel="stylesheet" type="text/css" th:href="@{/css/bootstrap-theme.css}">
    11. <script type="text/javascript" th:src="@{/js/jquery-3.6.0.js}">script>
    12. <script type="text/javascript" th:src="@{/js/login.js}">script>
    13. <script>
    14. $(function() {
    15. //防止页面后退
    16. history.pushState(null, null, document.URL);
    17. window.addEventListener('popstate', function () {
    18. history.pushState(null, null, document.URL);
    19. });
    20. })
    21. script>
    22. head>
    23. <body onload="loadTopWindow()">
    24. <div id="magicalDragScene" class="mc-root mc-ui-absolute-pane">
    25. <h1 style="margin-left: 56%;margin-top: 8%;font-family: 隶书;font-size: 60px;color: white" >社区流浪动物救助管理系统h1>
    26. <br>
    27. <div id="tmd" style="width: 25%;height: 300px;">
    28. <form style="margin: 0 auto;width: 80%;height: 300px;" th:action="@{/loginUser}" method="post" onsubmit="return regCheck()">
    29. <h1 class="h3 mb-3 font-weight-normal" style="color:white;font-family: 隶书;text-align: center;" >登录h1>
    30. <input id="username" name="username" class="layui-input" type="text" th:placeholder="请填写用户名"/>
    31. <input id="password" name="password" class="layui-input" style="margin-top: 5px" type="password" th:placeholder="请填写用户密码" origin-type="password"/>
    32. <br>
    33. <select name="type" class="form-control" style="width: 75%">
    34. <option value="1" selected>管理员option>
    35. <option value="2">用户option>
    36. select>
    37. <span id="statusTip" style="color: #d62727;font-size: 15px;margin-left: 40%" th:text="${status}">span>
    38. <br>
    39. <button class="layui-btn1" style="width: 300px;height: 40px;font-size: 16px;color: white" type="submit">登录button>
    40. form>
    41. div>
    42. <br>
    43. div>
    44. body>
    45. html>
    1. /**
    2. * 登录
    3. * @param username
    4. * @param password
    5. * @param type
    6. * @param httpSession
    7. * @param model
    8. * @return
    9. * @throws UnsupportedEncodingException
    10. */
    11. @RequestMapping(value = "/loginUser",method = RequestMethod.POST)
    12. public String loginUser( String username,String password, String type,HttpSession httpSession, Model model) throws UnsupportedEncodingException {
    13. Admin admin = new Admin();
    14. if(type !=null&& type.equals("1")){
    15. admin = loginService.selectAdmin(username,password);
    16. if (admin != null){
    17. httpSession.setAttribute("username",admin.getUsername());
    18. httpSession.setAttribute("admin",admin);
    19. httpSession.setAttribute("type",type);
    20. model.addAttribute("type",type);
    21. return "home/homepage";
    22. }else{
    23. model.addAttribute("status","账号或者密码输入错误!");
    24. return "login";
    25. }
    26. }
    27. else if(type.equals("2")){//用户
    28. User user = loginService.selectUser(username,password);
    29. if(user != null){
    30. httpSession.setAttribute("username",user.getRealname());
    31. httpSession.setAttribute("user",user);
    32. httpSession.setAttribute("type",type);
    33. model.addAttribute("type",type);
    34. return "redirect:/toIndex";
    35. //return "home/homepage";
    36. }else{
    37. model.addAttribute("status","账号或者密码输入错误!");
    38. return "login";
    39. }
    40. }else{
    41. model.addAttribute("status","账号或者密码输入错误!");
    42. return "login";
    43. }
    44. }

    其他模块代码都是类似的,此项目适合初学者学习借鉴
    喜欢的朋友的点赞加关注,感兴趣的同学可以研究!!!!!

    项目截图中的数据,很多是用来测试的,需要自行添加合适的数据图片!!
    非开源!!!!!! 感谢  = v =

  • 相关阅读:
    基于SpringBoot的时间管理系统
    【2023秋招面经】OPPO 前端 一面(40min)
    【蜂鸟E203的FPGA验证】Chap.7 Vivado综合与性能分析-建立Vivado工程
    2022年Java秋招面试必看的 | Linux 面试题
    2022.9.17-----leetcode.1624
    elementui表格自定义指令控制显示哪些列可以拖动
    Laravel :如何将Excel文件导入数据库
    Qt | QListView、QListWidget、QTableView、QTableWidget的使用示例及区别
    overleaf中latex语法总结
    如何构建一台机器学习服务器
  • 原文地址:https://blog.csdn.net/qq_43485489/article/details/126424231