• 基于jsp+mysql+Spring+mybatis的SSM旅游服务综合平台管理系统


     作者主页:夜未央5788

     简介: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.数据库:MySql 5.7版本;
    6.是否Maven项目:否;

    技术栈

    1. 后端:Spring+SpringMVC+Mbytes
    2. 前端:JSP+css+javascript+bootstrap+jQuery

    使用说明

    1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
    2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
    若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
    3. 将项目中config-jdbc.properties配置文件中的数据库配置改为自己的配置;
    4. 运行项目,在浏览器中输入localhost:8080/ssm_lvyou_fuwu
    用户账号/密码: user/123456
    管理员账号/密码:admin/admin

    运行截图

    用户角色


     

     

     

     

     

     

    管理员角色 

     

     

     

     

     

     

    相关代码 

     管理员管理Controller类

    1. @Controller
    2. public class AdminController {
    3. private AdminService adminService;
    4. @Autowired
    5. private IntroduceService introduceService;
    6. @Autowired
    7. private JinService jinService;
    8. @Autowired
    9. private LineService lineService;
    10. @Autowired
    11. private QiuTypeService qiutypeService;
    12. public AdminService getAdminService() {
    13. return adminService;
    14. }
    15. @Autowired
    16. public void setAdminService(AdminService adminService) {
    17. this.adminService = adminService;
    18. }
    19. @Autowired
    20. private HttpServletRequest request;
    21. @Autowired
    22. private HttpServletResponse response;
    23. @RequestMapping("login")
    24. public String Login(Admin admin) {
    25. Map<String,Object> map = new HashMap<String,Object>();
    26. try {
    27. Admin a = adminService.Login(admin.getLogin());
    28. System.out.println(admin);
    29. if(a==null)
    30. {
    31. map.put("mgf", "用户不存在");
    32. map.put("success", false);
    33. }
    34. else if(!a.getPwd().equals(admin.getPwd()))
    35. {
    36. map.put("mgf", "密码错误");
    37. map.put("success", false);
    38. }
    39. else
    40. {
    41. request.getSession().setAttribute("admin", a);
    42. map.put("mgf", "验证通过!");
    43. map.put("success", true);
    44. }
    45. } catch (Exception e) {
    46. map.put("mgf", "错误:"+e.getMessage());
    47. map.put("success", false);
    48. }
    49. String result = new JSONObject(map).toString();
    50. ResponseUtil.write(response, result);
    51. return null;
    52. }
    53. @RequestMapping("/exit")
    54. public String Exit() {
    55. Map<String,Object> map = new HashMap<String,Object>();
    56. try {
    57. request.getSession().removeAttribute("admin");
    58. map.put("mgf", "已安全退出!");
    59. map.put("success", true);
    60. } catch (Exception e) {
    61. map.put("mgf", "错误:"+e.getMessage());
    62. map.put("success", false);
    63. }
    64. String result = new JSONObject(map).toString();
    65. ResponseUtil.write(response, result);
    66. return null;
    67. }
    68. @RequestMapping("/tui")
    69. public String tui(Model model) {
    70. Pages p=new Pages();
    71. p.setPagesize(6);
    72. Jin j=new Jin();
    73. j.setPage(p);
    74. Line l=new Line();
    75. l.setPage(p);
    76. List<Jin> jin = jinService.Get(j);
    77. Introduce intr = introduceService.GetByID(1);
    78. List<Line> ls = lineService.Get(l);
    79. model.addAttribute("jin", jin);
    80. model.addAttribute("intr", intr);
    81. request.getSession().setAttribute("left_line", ls);
    82. request.getSession().setAttribute("top_qiutype", qiutypeService.Get());
    83. return "index";
    84. }
    85. }

    源码获取

    如果也想学习本系统,下面领取。回复:226ssm

  • 相关阅读:
    Python中的模块
    软考高项-规划风险应对
    区块链的历史和发展:从比特币到以太坊
    【广州华锐互动】VR线上播控管理系统让虚拟现实教学效果更加显著
    python中集合简介及使用
    [ZJCTF 2019]NiZhuanSiWei - 伪协议+文件包含+反序列化
    自动打包压缩备份下载及删除 bat脚本命令
    Xorm 使用手册,面向工作学习
    4年测试经验,面试却突破不了20K,真是太卷了····
    Altium Designer 相同模块的布局布线复用-AD
  • 原文地址:https://blog.csdn.net/hanyunlong1989/article/details/125404186