• Java项目:ssm流浪猫狗救助管理系统


    作者主页:源码空间站2022

     简介:Java领域优质创作者、Java项目、学习资料、技术互助

    文末获取源码

    项目介绍

    流浪猫狗救助管理系统。该项目分为前后台;

    前台主要功能包括:会员的注册登陆,流浪猫狗知识,领养中心,团队活动,流浪宠物详情,申请领养等;

    后台主要功能包括:管理员的用户信息管理,流浪猫狗信息管理,管理员信息管理,领养管理,评论管理,团队活动管理,志愿者申请信息管理,同意/不同意领养信息列表等

    环境需要

    1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
    2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
    3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
    4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
    5.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目 

    6.数据库:MySql 8.0版本;

    技术栈

    1. 后端:Spring SpringMVC MyBatis

    2. 前端:JSP+bootstrap+jQuery

    使用说明

    1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
    2. 将项目中db.properties配置文件中的数据库配置改为自己的配置

    3. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;

    若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行;

    4. 运行项目,
    前台地址 http://localhost:8080/web/animal/index.jsp

    后台地址 http://localhost:8080/web/animal/admin/login.jsp

    运行截图

    前台页面

     后台页面

      

    相关代码 

    分页管理控制器

    1. @Controller
    2. @RequestMapping("apply")
    3. public class ApplyController {
    4. @Autowired
    5. private ApplyService applyService;
    6. @RequestMapping("applys.action")
    7. @ResponseBody
    8. public Message getBlog(@RequestParam(value = "pn",defaultValue = "1") Integer pn){
    9. // 引入PageHelper分页插件
    10. // 在查询之前只需要调用,传入页码,以及每页的大小
    11. PageHelper.startPage(pn,3);
    12. List applys = applyService.getApply();
    13. System.out.println(applys);
    14. // startPage后面紧跟的这个查询就是一个分页查询
    15. // 使用pageInfo包装查询后的结果,只需要将pageInfo交给页面就行了。
    16. // 封装了详细的分页信息,包括有我们查询出来的数据,传入连续显示的页数
    17. PageInfo page=new PageInfo(applys,2);
    18. return Message.success().add("pageInfo",page);
    19. }
    20. @RequestMapping("create.action")
    21. @ResponseBody
    22. public Message addApply(Apply apply){
    23. apply.setApplyTime(new Date());
    24. apply.setState(2);
    25. int i = applyService.addApply(apply);
    26. if(i>0){
    27. return Message.success();
    28. }else{
    29. return Message.fail();
    30. }
    31. }
    32. @RequestMapping("delete.action")
    33. @ResponseBody
    34. public Message deleteApply(Integer id){
    35. int i = applyService.deleteApply(id);
    36. if(i>0){
    37. return Message.success();
    38. }else {
    39. return Message.fail();
    40. }
    41. }
    42. @RequestMapping("update.action")
    43. @ResponseBody
    44. public Message updateApply(Apply apply){
    45. if(applyService.updateApply(apply)>0){
    46. return Message.success();
    47. }else{
    48. return Message.fail();
    49. }
    50. }
    51. @RequestMapping("findById.action")
    52. @ResponseBody
    53. public Message findById(Integer id){
    54. Apply apply=applyService.findById(id);
    55. if(apply!=null){
    56. return Message.success().add("apply",apply);
    57. }else{
    58. return Message.fail();
    59. }
    60. }
    61. @RequestMapping("findByState.action")
    62. @ResponseBody
    63. public Message findByTime(@RequestParam(defaultValue ="1",value = "pn") Integer pn,Integer state){
    64. PageHelper.startPage(pn,4);
    65. List states = applyService.findByState(state);
    66. if(states!=null){
    67. PageInfo page=new PageInfo(states,3);
    68. return Message.success().add("pageInfo",page);
    69. }else{
    70. return Message.fail();
    71. }
    72. }
    73. }

     如果也想学习本系统,下面领取。关注并回复:057ssm

  • 相关阅读:
    OPPO公布全新AI战略,AI 手机时代再提速
    前端使用 Konva 实现可视化设计器(10)- 对齐线
    连接数据库时遇到的bug1号
    java上传文件到指定服务器
    Flutter 填坑录 (不定时更新)
    图像处理:Python使用OpenCV进行图像锐化 (非锐化掩模、拉普拉斯滤波器)
    adb无线模式连接设备(包含多台设备无线连接)
    2022 CCF BDCI 返乡发展人群预测 [0.9117+]
    JAVA 歌词解析 采用 TreeMap处理
    【VMware虚拟机中ubuntu系列】—— 在虚拟机中使用本机摄像头的详细教程与常见问题分析及解决
  • 原文地址:https://blog.csdn.net/m0_74967853/article/details/128162074