基于javaweb+mysql的springboot物业管理系统(java+springboot+html+thymeleaf+layui+mysql)

本文详细介绍了基于Java、SpringBoot、HTML、Thymeleaf、Layui以及MySQL的物业管理系统开发,涵盖了登录、房屋和车位管理、公告通知等功能,适合课程设计、大作业等学习场景。
摘要由CSDN通过智能技术生成

基于javaweb+mysql的springboot物业管理系统(java+springboot+html+thymeleaf+layui+mysql)

私信源码获取及调试交流

运行环境

Java≥8、MySQL≥5.7

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

基于javaweb的SpringBoot物业管理系统(java+springboot+html+thymeleaf+layui+mysql)

项目介绍

主要功能包括:

前台:登录,房屋购买,车位购买,公告通知,出入登记,投诉服务,报修服务,关于我们

后台:楼宇管理,住房管理,车位管理,物业管理,抄表管理,纳税记录管理,住户管理,住户投诉,住户报修,系统管理,公告管理,出入记录,评价管理等

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 4.数据库:MySql 5.7/8.0版本均可; 5.是否Maven项目:是;

技术栈

后端:springboot(Spring+SpringMVC+Mybatis)

前端:HTML,jquery,Thymeleaf,Layui

使用说明

项目运行: 1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行项目,控制台提示运行成功后再去运行前端项目; 5. 管理员用户名密码:admin/admin 普通用户名密码:user/123456

首页展示页面:

服务管理展示:

公告通知管理:

售楼情况:

后台管理住户保修:

抄表管理展示:

车位管理展示:

住户投诉管理:

住房管理列表:

User user = service.loginByPassword(phone,password);

if (user == null){

resBody.setCode(500);

resBody.setMsg("登录失败,请重新登录");

}else {

session.setAttribute("user",user);

resBody.setCode(200);

resBody.setMsg("登录成功");

return resBody;

@PostMapping("/api/updatePass")

public ResBody updatePass(@RequestBody Map<String, Object> params,


resBody.setCode(500);

resBody.setMsg("修改失败");

return resBody;

@GetMapping("/api/delRoom")

public ResBody delRoom(@RequestParam int id) {

ResBody resBody = new ResBody();

int i = service.delRoom(id);

if (i == 1){

resBody.setCode(200);

resBody.setMsg("删除成功");

}else{

resBody.setCode(500);

resBody.setMsg("删除失败");


@Autowired

UserService service;

@GetMapping("/api/getUsers")

public ResBody getUsers(@RequestParam int page,

@RequestParam int limit) {

ResBody resBody = new ResBody();

int count = service.getCount();

List<User> list= service.getUsers(page, limit);

resBody.setCount(count);

resBody.setData(list);

resBody.setCode(0);


ResBody resBody = new ResBody();

String email = params.get("email").toString();

String password = params.get("password").toString();

Admin admin = service.findAdmin(email,password);

if (admin == null){

resBody.setCode(500);

resBody.setMsg("登录失败,请重新登录");

}else {

session.setAttribute("admin",admin);

LOG.info(admin.toString());

resBody.setCode(200);

return resBody;

@PostMapping("/api/updateRoom")

public ResBody updateDanyuan(@RequestBody Room room) {

ResBody resBody = new ResBody();

int i = service.updateRoom(room);

if (i == 1){

resBody.setCode(200);

resBody.setMsg("修改成功");

}else{

resBody.setCode(500);

resBody.setMsg("修改失败");

return resBody;

@GetMapping("/api/delRoom")

public ResBody delRoom(@RequestParam int id) {

}else{

resBody.setCode(500);

resBody.setMsg("停用失败");

return resBody;

@GetMapping("/api/findUser")

public ResBody findBuilding(@RequestParam int page,

@RequestParam int limit,

@RequestParam String name) {

ResBody resBody = new ResBody();

int count = service.getCount(name);

List<User> list= service.findUser(page, limit,name);

resBody.setCount(count);


resBody.setMsg("登录失败,请重新登录");

}else {

session.setAttribute("admin",admin);

LOG.info(admin.toString());

resBody.setCode(200);

resBody.setMsg("登录成功");

return resBody;

@PostMapping("/admin/updatePass")

public ResBody updatePass(@RequestBody Map<String, Object> params,

HttpSession session) {

ResBody resBody = new ResBody();

String newPsw = params.get("newPsw").toString();

Admin admin = (Admin) session.getAttribute("admin");

if (user == null){

resBody.setCode(500);

resBody.setMsg("登录失败,请重新登录");

}else {

session.setAttribute("user",user);

resBody.setCode(200);

resBody.setMsg("登录成功");

return resBody;

@PostMapping("/api/updatePass")

public ResBody updatePass(@RequestBody Map<String, Object> params,

HttpSession session) {

ResBody resBody = new ResBody();

String newPsw = params.get("newPsw").toString();

User user = (User) session.getAttribute("user");

LOG.info(admin.toString());

resBody.setCode(200);

resBody.setMsg("登录成功");

return resBody;

@PostMapping("/admin/updatePass")

public ResBody updatePass(@RequestBody Map<String, Object> params,

HttpSession session) {

ResBody resBody = new ResBody();

String newPsw = params.get("newPsw").toString();

Admin admin = (Admin) session.getAttribute("admin");

resBody.setMsg("登录成功");

return resBody;

@PostMapping("/admin/updatePass")

public ResBody updatePass(@RequestBody Map<String, Object> params,

HttpSession session) {

ResBody resBody = new ResBody();

String newPsw = params.get("newPsw").toString();

Admin admin = (Admin) session.getAttribute("admin");

admin.setPassword(newPsw);

int i = service.updatePass(admin.getId(),newPsw);

if (i != 1){

resBody.setCode(500);

resBody.setMsg("修改失败,后台出错");


resBody.setMsg("修改成功");

}else{

resBody.setCode(500);

resBody.setMsg("修改失败");

return resBody;

@GetMapping("/api/delRoom")

public ResBody delRoom(@RequestParam int id) {

ResBody resBody = new ResBody();

int i = service.delRoom(id);

if (i == 1){

resBody.setCode(200);

@GetMapping("/api/getUsers")

public ResBody getUsers(@RequestParam int page,

@RequestParam int limit) {

ResBody resBody = new ResBody();

int count = service.getCount();

List<User> list= service.getUsers(page, limit);

resBody.setCount(count);

resBody.setData(list);

resBody.setCode(0);

return resBody;

@PostMapping("/api/addUser")

public ResBody addUser(@RequestBody User user) {


String newPsw = params.get("newPsw").toString();

User user = (User) session.getAttribute("user");

user.setPassword(newPsw);

int i = service.updatePass(user.getId(),newPsw);

if (i != 1){

resBody.setCode(500);

resBody.setMsg("修改失败,后台出错");

}else {

session.setAttribute("user",user);

resBody.setCode(200);


HttpSession session) {

ResBody resBody = new ResBody();

String newPsw = params.get("newPsw").toString();

User user = (User) session.getAttribute("user");

user.setPassword(newPsw);

int i = service.updatePass(user.getId(),newPsw);

if (i != 1){

resBody.setCode(500);

resBody.setMsg("修改失败,后台出错");

}else {

int i = service.addUser(user);

if (i == 1){

resBody.setCode(200);

resBody.setMsg("添加成功");

}else{

resBody.setCode(500);

resBody.setMsg("添加失败");

return resBody;

@PostMapping("/api/updateUser")

public ResBody updateUser(@RequestBody User user) {

ResBody resBody = new ResBody();

resBody.setMsg("修改成功");

}else{

resBody.setCode(500);

resBody.setMsg("修改失败");

return resBody;

@GetMapping("/api/delRoom")

public ResBody delRoom(@RequestParam int id) {

ResBody resBody = new ResBody();

int i = service.delRoom(id);

if (i == 1){

resBody.setCode(200);

resBody.setMsg("删除成功");
User user = service.loginByPassword(phone,password);

if (user == null){

resBody.setCode(500);

resBody.setMsg("登录失败,请重新登录");

}else {

session.setAttribute("user",user);

resBody.setCode(200);

resBody.setMsg("登录成功");

return resBody;

@PostMapping("/api/updatePass")

public ResBody updatePass(@RequestBody Map<String, Object> params,

HttpSession session) {

public class RoomController {

@Autowired

RoomService service;

@GetMapping("/api/getAllRooms")

public ResBody getAllRooms(@RequestParam int page,

@RequestParam int limit) {

ResBody resBody = new ResBody();

int count = service.getCount();

List<Room> list= service.getAllRooms(page, limit);

resBody.setCount(count);

resBody.setData(list);

resBody.setCode(0);

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
基于Servlet+Mybatis+ThymeleafJavaweb项目的技术栈主要包括以下几个方面: 1. Servlet:Servlet是JavaWeb中的一种技术规范,用于处理HTTP请求和响应。在JavaWeb应用中,Servlet可以接收并响应来自客户端的请求,同时也可以与数据库进行交互、调用业务逻辑等。 2. Mybatis:Mybatis是一种流行的Java持久层框架,它提供了一种优雅的方式来管理数据库访问。与传统的ORM框架不同,Mybatis将SQL语句和Java代码分离,开发者可以自由地编写SQL语句,同时也可以通过Mybatis提供的映射文件将Java对象和数据库表进行映射。 3. ThymeleafThymeleaf是一种流行的Java模板引擎,它可以将HTML模板和Java代码结合起来,生成动态的Web页面。与JSP相比,Thymeleaf更加灵活、易于维护,同时也支持HTML5特性、国际化等高级功能。 除此之外,基于Servlet+Mybatis+ThymeleafJavaweb项目还涉及到一些其他的技术,比如: 4. 数据库:JavaWeb应用通常需要与数据库进行交互,目前常用的数据库有MySQL、Oracle、PostgreSQL等。 5. Maven:Maven是一种流行的Java项目管理工具,它可以自动化地管理项目依赖、构建过程、测试过程等。 6. Git:Git是一种流行的版本控制工具,它可以帮助开发者协同开发、管理代码变更、回滚代码等。 总之,基于Servlet+Mybatis+ThymeleafJavaweb项目是一个完整的JavaWeb应用,需要涉及多个技术方面才能实现。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值