基于javaweb+mysql的springboot+mybatis美容院管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)

本文主要是介绍基于javaweb+mysql的springboot+mybatis美容院管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

基于javaweb+mysql的springboot+mybatis美容院管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)

运行环境

Java≥8、MySQL≥5.7

开发工具

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

技术框架

JavaBean MVC JSP SpringBoot MyBatis MySQL CSS JavaScript Bootstrap

适用

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

功能说明

登录、注册、退出、用户模块、公告模块、顾客模块、服务项目模块、消费模块的增删改查管理

eclipse/MyEclipse运行:

idea运行:

        this.redirectList(request, response);}/*** 获取公告的详细信息(详情页面与编辑页面要显示该公告的详情)并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping({"noticeGet", "noticeEditPre"})public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = request.getParameter("id");//取出主键idNotice vo = noticeService.get(id);request.getSession().setAttribute("vo", vo);String to = request.getRequestURI().toLowerCase().contains("get") ? "info" : "edit";//判断是去详情显示页面还是编辑页面response.sendRedirect("notice_" + to + ".jsp");}/*** 根据条件查询公告的列表并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping("noticeList")public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {this.redirectList(request, response);}/*** 跳转到列表页面** @param request* @param response*/private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {//查询列和关键字String searchColumn = request.getParameter("searchColumn");String keyword = request.getParameter("keyword");Map<String, Object> params = new HashMap();//用来保存控制层传进来的参数(查询条件)params.put("searchColumn", searchColumn);//要查询的列params.put("keyword", keyword);//查询的关键字Map<String, Object> map = noticeService.list(params);request.getSession().setAttribute("list", map.get("list"));Integer totalRecord = (Integer) map.get("totalCount");//根据查询条件取出对应的总记录数,用于分页String pageNum = request.getParameter("pageNum");//封装分页参数com.demo.util.PageBean<Object> pb = new com.demo.util.PageBean(Integer.valueOf(pageNum != null ? pageNum : "1"), totalRecord);params.put("startIndex", pb.getStartIndex());params.put("pageSize", pb.getPageSize());List list = (List) noticeService.list(params).get("list");//根据分页参数startIndex、pageSize查询出来的最终结果list
        request.getRequestDispatcher("login.jsp").forward(request, response);}@RequestMapping("authRegister")public void register(HttpServletResponse response, HttpServletRequest request) throws IOException, ServletException {String username = request.getParameter("username");String password = request.getParameter("password");System.out.println("username=" + username);System.out.println("password=" + password);Map<String, Object> params = new HashMap();params.put("startIndex", 0);params.put("pageSize", Long.MAX_VALUE);List<User> list = (List<User>) userService.list(params).get("list");for (User user : list) {if (user.getUsername().equals(username) /*&& user.getPassword().equals(password)*/) {//说明该用户名已存在,必须换个用户名才能注册request.getSession().setAttribute("alert_msg", "错误:用户名已存在!");request.getRequestDispatcher("register.jsp").forward(request, response);return;}}User vo = new User();vo.setUsername(username);vo.setPassword(password);//vo.setUserType("普通用户");//需要设置一个默认值userService.insert(vo);request.getSession().setAttribute("alert_msg", "注册成功!用户名:[" + username + "]");request.getRequestDispatcher("login.jsp").forward(request, response);}@RequestMapping("authLogout")public void logout(HttpServletResponse response, HttpServletRequest request) throws IOException {HttpSession session = request.getSession();User user = (User) session.getAttribute("loginUser");if (user != null) {session.removeAttribute("loginUser");}response.sendRedirect("login.jsp");}@RequestMapping("authValidationCode")public void validationCode(HttpServletResponse response, HttpServletRequest request) throws IOException {String codeChars = "0123456789";// 图形验证码的字符集合,系统将随机从这个字符串中选择一些字符作为验证码//  获得验证码集合的长度
     * @throws IOException*/@RequestMapping("xiaofeiDelete")public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = request.getParameter("id");xiaofeiService.delete(Arrays.asList(id));this.redirectList(request, response);}/*** 编辑消费** @param response* @param request* @throws IOException*/@RequestMapping("xiaofeiEdit")public void edit(Xiaofei vo, HttpServletResponse response, HttpServletRequest request) throws IOException {xiaofeiService.update(vo);this.redirectList(request, response);}/*** 获取消费的详细信息(详情页面与编辑页面要显示该消费的详情)并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping({"xiaofeiGet", "xiaofeiEditPre"})public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = request.getParameter("id");//取出主键idXiaofei vo = xiaofeiService.get(id);request.getSession().setAttribute("vo", vo);String to = request.getRequestURI().toLowerCase().contains("get") ? "info" : "edit";//判断是去详情显示页面还是编辑页面response.sendRedirect("xiaofei_" + to + ".jsp");}/*** 根据条件查询消费的列表并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping("xiaofeiList")
        this.redirectList(request, response);}/*** 删除消费** @param response* @param request* @throws IOException*/@RequestMapping("xiaofeiDelete")public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = request.getParameter("id");xiaofeiService.delete(Arrays.asList(id));this.redirectList(request, response);}/*** 编辑消费** @param response* @param request* @throws IOException*/@RequestMapping("xiaofeiEdit")public void edit(Xiaofei vo, HttpServletResponse response, HttpServletRequest request) throws IOException {xiaofeiService.update(vo);this.redirectList(request, response);}/*** 获取消费的详细信息(详情页面与编辑页面要显示该消费的详情)并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping({"xiaofeiGet", "xiaofeiEditPre"})public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = request.getParameter("id");//取出主键idXiaofei vo = xiaofeiService.get(id);request.getSession().setAttribute("vo", vo);String to = request.getRequestURI().toLowerCase().contains("get") ? "info" : "edit";//判断是去详情显示页面还是编辑页面response.sendRedirect("xiaofei_" + to + ".jsp");}/*** 根据条件查询消费的列表并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping("xiaofeiList")
        request.getSession().setAttribute("pageBean", pb);request.getSession().setAttribute("list", pb.getList());response.sendRedirect("notice_list.jsp");}
}@Controller
@RequestMapping
public class FwxmController {@Autowiredprivate FwxmService fwxmService;/*** 增加服务项目** @param response* @param request* @throws IOException*/@RequestMapping("fwxmAdd")public void add(Fwxm vo, HttpServletResponse response, HttpServletRequest request) throws IOException {//调用Service层的增加(insert)方法fwxmService.insert(vo);this.redirectList(request, response);}
            return;}Map<String, Object> params = new HashMap();List<User> list = (List<User>) userService.list(params).get("list");for (User user : list) {if (user.getUsername().equals(username) && user.getPassword().equals(password)) {//找到这个管理员了request.getSession().setAttribute("loginUser", user);request.getSession().setMaxInactiveInterval(Integer.MAX_VALUE);request.getRequestDispatcher("menu.jsp").forward(request, response);return;}}request.getSession().setAttribute("alert_msg", "错误:用户名或密码错误!");request.getRequestDispatcher("login.jsp").forward(request, response);}@RequestMapping("authRegister")public void register(HttpServletResponse response, HttpServletRequest request) throws IOException, ServletException {String username = request.getParameter("username");String password = request.getParameter("password");System.out.println("username=" + username);System.out.println("password=" + password);Map<String, Object> params = new HashMap();params.put("startIndex", 0);params.put("pageSize", Long.MAX_VALUE);List<User> list = (List<User>) userService.list(params).get("list");for (User user : list) {if (user.getUsername().equals(username) /*&& user.getPassword().equals(password)*/) {//说明该用户名已存在,必须换个用户名才能注册request.getSession().setAttribute("alert_msg", "错误:用户名已存在!");request.getRequestDispatcher("register.jsp").forward(request, response);return;}}User vo = new User();vo.setUsername(username);vo.setPassword(password);//vo.setUserType("普通用户");//需要设置一个默认值userService.insert(vo);

@Controller
@RequestMapping
public class GukeController {@Autowiredprivate GukeService gukeService;/*** 增加顾客** @param response* @param request* @throws IOException*/@RequestMapping("gukeAdd")public void add(Guke vo, HttpServletResponse response, HttpServletRequest request) throws IOException {//调用Service层的增加(insert)方法gukeService.insert(vo);this.redirectList(request, response);}/*** 删除顾客** @param response* @param request* @throws IOException*/@RequestMapping("gukeDelete")public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = request.getParameter("id");gukeService.delete(Arrays.asList(id));
    @RequestMapping("xiaofeiDelete")public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = request.getParameter("id");xiaofeiService.delete(Arrays.asList(id));this.redirectList(request, response);}/*** 编辑消费** @param response* @param request* @throws IOException*/@RequestMapping("xiaofeiEdit")public void edit(Xiaofei vo, HttpServletResponse response, HttpServletRequest request) throws IOException {xiaofeiService.update(vo);this.redirectList(request, response);}/*** 获取消费的详细信息(详情页面与编辑页面要显示该消费的详情)并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping({"xiaofeiGet", "xiaofeiEditPre"})public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = request.getParameter("id");//取出主键idXiaofei vo = xiaofeiService.get(id);request.getSession().setAttribute("vo", vo);String to = request.getRequestURI().toLowerCase().contains("get") ? "info" : "edit";//判断是去详情显示页面还是编辑页面response.sendRedirect("xiaofei_" + to + ".jsp");}/*** 根据条件查询消费的列表并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping("xiaofeiList")public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {this.redirectList(request, response);}/*** 跳转到列表页面
        response.sendRedirect("notice_" + to + ".jsp");}/*** 根据条件查询公告的列表并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping("noticeList")public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {this.redirectList(request, response);}/*** 跳转到列表页面** @param request* @param response*/private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {//查询列和关键字String searchColumn = request.getParameter("searchColumn");String keyword = request.getParameter("keyword");Map<String, Object> params = new HashMap();//用来保存控制层传进来的参数(查询条件)params.put("searchColumn", searchColumn);//要查询的列params.put("keyword", keyword);//查询的关键字Map<String, Object> map = noticeService.list(params);request.getSession().setAttribute("list", map.get("list"));Integer totalRecord = (Integer) map.get("totalCount");//根据查询条件取出对应的总记录数,用于分页String pageNum = request.getParameter("pageNum");//封装分页参数com.demo.util.PageBean<Object> pb = new com.demo.util.PageBean(Integer.valueOf(pageNum != null ? pageNum : "1"), totalRecord);params.put("startIndex", pb.getStartIndex());params.put("pageSize", pb.getPageSize());List list = (List) noticeService.list(params).get("list");//根据分页参数startIndex、pageSize查询出来的最终结果listpb.setServlet("noticeList");pb.setSearchColumn(searchColumn);pb.setKeyword(keyword);pb.setList(list);request.getSession().setAttribute("pageBean", pb);request.getSession().setAttribute("list", pb.getList());response.sendRedirect("notice_list.jsp");}
}
        request.getSession().setAttribute("pageBean", pb);request.getSession().setAttribute("list", pb.getList());response.sendRedirect("fwxm_list.jsp");}
}@Controller
@RequestMapping
public class GukeController {@Autowiredprivate GukeService gukeService;/*** 增加顾客** @param response* @param request* @throws IOException*/@RequestMapping("gukeAdd")public void add(Guke vo, HttpServletResponse response, HttpServletRequest request) throws IOException {//调用Service层的增加(insert)方法gukeService.insert(vo);this.redirectList(request, response);}/*** 删除顾客** @param response* @param request* @throws IOException*/@RequestMapping("gukeDelete")
        params.put("startIndex", pb.getStartIndex());params.put("pageSize", pb.getPageSize());List list = (List) userService.list(params).get("list");//根据分页参数startIndex、pageSize查询出来的最终结果listpb.setServlet("userList");pb.setSearchColumn(searchColumn);pb.setKeyword(keyword);pb.setList(list);request.getSession().setAttribute("pageBean", pb);request.getSession().setAttribute("list", pb.getList());response.sendRedirect("user_list.jsp");}
}@Configurationpublic class CustomWebMvcConfigurer implements WebMvcConfigurer {@Overridepublic void addInterceptors(InterceptorRegistry registry) {registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/*");}public class LoginInterceptor implements HandlerInterceptor {public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object o) throws Exception {request.setCharacterEncoding("utf-8");response.setCharacterEncoding("utf-8");HttpSession session = request.getSession();//移除错误提示session.removeAttribute("alert_msg");//登录拦截String url = request.getRequestURL().toString();String[] access = new String[]{"login", "logout", "register", ".css", ".js", ".png", ".jpg", "validationCode"};for (String action : access) {if (url.toLowerCase().contains(action.toLowerCase())) {
    }/*** 获取消费的详细信息(详情页面与编辑页面要显示该消费的详情)并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping({"xiaofeiGet", "xiaofeiEditPre"})public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = request.getParameter("id");//取出主键idXiaofei vo = xiaofeiService.get(id);request.getSession().setAttribute("vo", vo);String to = request.getRequestURI().toLowerCase().contains("get") ? "info" : "edit";//判断是去详情显示页面还是编辑页面response.sendRedirect("xiaofei_" + to + ".jsp");}/*** 根据条件查询消费的列表并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping("xiaofeiList")public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {this.redirectList(request, response);}/*** 跳转到列表页面** @param request* @param response*/private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {//查询列和关键字String searchColumn = request.getParameter("searchColumn");String keyword = request.getParameter("keyword");Map<String, Object> params = new HashMap();//用来保存控制层传进来的参数(查询条件)params.put("searchColumn", searchColumn);//要查询的列params.put("keyword", keyword);//查询的关键字Map<String, Object> map = xiaofeiService.list(params);request.getSession().setAttribute("list", map.get("list"));Integer totalRecord = (Integer) map.get("totalCount");//根据查询条件取出对应的总记录数,用于分页
        params.put("pageSize", pb.getPageSize());List list = (List) xiaofeiService.list(params).get("list");//根据分页参数startIndex、pageSize查询出来的最终结果listpb.setServlet("xiaofeiList");pb.setSearchColumn(searchColumn);pb.setKeyword(keyword);pb.setList(list);request.getSession().setAttribute("pageBean", pb);request.getSession().setAttribute("list", pb.getList());response.sendRedirect("xiaofei_list.jsp");}
}@Controller
@RequestMapping
public class NoticeController {@Autowiredprivate NoticeService noticeService;/*** 增加公告** @param response* @param request* @throws IOException*/@RequestMapping("noticeAdd")public void add(Notice vo, HttpServletResponse response, HttpServletRequest request) throws IOException {//调用Service层的增加(insert)方法
    public void resetPassword(HttpServletResponse response, HttpServletRequest request) throws IOException, ServletException {String msg;User loginUser = (User) request.getSession().getAttribute("loginUser");String oldPassword = request.getParameter("oldPassword");if (!loginUser.getPassword().equals(oldPassword)) {msg = "原密码错误!";} else {String newPassword = request.getParameter("newPassword");loginUser.setPassword(newPassword);this.userService.update(loginUser);msg = "修改成功!";}request.getSession().setAttribute("alert_msg", msg);request.getRequestDispatcher("reset_password.jsp").forward(request, response);}// 返回一个随机颜色(Color对象)private Color getRandomColor(int minColor, int maxColor) {Random random = new Random();// 保存minColor最大不会超过255if (minColor > 255)minColor = 255;//  保存minColor最大不会超过255if (maxColor > 255)maxColor = 255;//  获得红色的随机颜色值int red = minColor + random.nextInt(maxColor - minColor);//  获得绿色的随机颜色值int green = minColor + random.nextInt(maxColor - minColor);//  获得蓝色的随机颜色值int blue = minColor + random.nextInt(maxColor - minColor);return new Color(red, green, blue);}
}@Controller
     ** @param response* @param request* @throws IOException*/@RequestMapping({"noticeGet", "noticeEditPre"})public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = request.getParameter("id");//取出主键idNotice vo = noticeService.get(id);request.getSession().setAttribute("vo", vo);String to = request.getRequestURI().toLowerCase().contains("get") ? "info" : "edit";//判断是去详情显示页面还是编辑页面response.sendRedirect("notice_" + to + ".jsp");}/*** 根据条件查询公告的列表并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping("noticeList")public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {this.redirectList(request, response);}/*** 跳转到列表页面** @param request* @param response*/private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {//查询列和关键字String searchColumn = request.getParameter("searchColumn");String keyword = request.getParameter("keyword");Map<String, Object> params = new HashMap();//用来保存控制层传进来的参数(查询条件)params.put("searchColumn", searchColumn);//要查询的列params.put("keyword", keyword);//查询的关键字Map<String, Object> map = noticeService.list(params);request.getSession().setAttribute("list", map.get("list"));
    /*** 增加服务项目** @param response* @param request* @throws IOException*/@RequestMapping("fwxmAdd")public void add(Fwxm vo, HttpServletResponse response, HttpServletRequest request) throws IOException {//调用Service层的增加(insert)方法fwxmService.insert(vo);this.redirectList(request, response);}/*** 删除服务项目** @param response* @param request* @throws IOException*/@RequestMapping("fwxmDelete")public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = request.getParameter("id");fwxmService.delete(Arrays.asList(id));this.redirectList(request, response);}/*** 编辑服务项目** @param response* @param request* @throws IOException*/@RequestMapping("fwxmEdit")public void edit(Fwxm vo, HttpServletResponse response, HttpServletRequest request) throws IOException {fwxmService.update(vo);this.redirectList(request, response);}/*** 获取服务项目的详细信息(详情页面与编辑页面要显示该服务项目的详情)并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping({"fwxmGet", "fwxmEditPre"})public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = request.getParameter("id");//取出主键id
        String to = request.getRequestURI().toLowerCase().contains("get") ? "info" : "edit";//判断是去详情显示页面还是编辑页面response.sendRedirect("xiaofei_" + to + ".jsp");}/*** 根据条件查询消费的列表并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping("xiaofeiList")public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {this.redirectList(request, response);}/*** 跳转到列表页面** @param request* @param response*/private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {//查询列和关键字String searchColumn = request.getParameter("searchColumn");String keyword = request.getParameter("keyword");Map<String, Object> params = new HashMap();//用来保存控制层传进来的参数(查询条件)params.put("searchColumn", searchColumn);//要查询的列params.put("keyword", keyword);//查询的关键字Map<String, Object> map = xiaofeiService.list(params);request.getSession().setAttribute("list", map.get("list"));Integer totalRecord = (Integer) map.get("totalCount");//根据查询条件取出对应的总记录数,用于分页String pageNum = request.getParameter("pageNum");//封装分页参数com.demo.util.PageBean<Object> pb = new com.demo.util.PageBean(Integer.valueOf(pageNum != null ? pageNum : "1"), totalRecord);params.put("startIndex", pb.getStartIndex());params.put("pageSize", pb.getPageSize());List list = (List) xiaofeiService.list(params).get("list");//根据分页参数startIndex、pageSize查询出来的最终结果listpb.setServlet("xiaofeiList");pb.setSearchColumn(searchColumn);pb.setKeyword(keyword);pb.setList(list);request.getSession().setAttribute("pageBean", pb);request.getSession().setAttribute("list", pb.getList());response.sendRedirect("xiaofei_list.jsp");}
}

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

这篇关于基于javaweb+mysql的springboot+mybatis美容院管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/558253

相关文章

Java中对象的创建和销毁过程详析

《Java中对象的创建和销毁过程详析》:本文主要介绍Java中对象的创建和销毁过程,对象的创建过程包括类加载检查、内存分配、初始化零值内存、设置对象头和执行init方法,对象的销毁过程由垃圾回收机... 目录前言对象的创建过程1. 类加载检查2China编程. 分配内存3. 初始化零值4. 设置对象头5. 执行

SpringBoot整合easy-es的详细过程

《SpringBoot整合easy-es的详细过程》本文介绍了EasyES,一个基于Elasticsearch的ORM框架,旨在简化开发流程并提高效率,EasyES支持SpringBoot框架,并提供... 目录一、easy-es简介二、实现基于Spring Boot框架的应用程序代码1.添加相关依赖2.添

通俗易懂的Java常见限流算法具体实现

《通俗易懂的Java常见限流算法具体实现》:本文主要介绍Java常见限流算法具体实现的相关资料,包括漏桶算法、令牌桶算法、Nginx限流和Redis+Lua限流的实现原理和具体步骤,并比较了它们的... 目录一、漏桶算法1.漏桶算法的思想和原理2.具体实现二、令牌桶算法1.令牌桶算法流程:2.具体实现2.1

SpringBoot中整合RabbitMQ(测试+部署上线最新完整)的过程

《SpringBoot中整合RabbitMQ(测试+部署上线最新完整)的过程》本文详细介绍了如何在虚拟机和宝塔面板中安装RabbitMQ,并使用Java代码实现消息的发送和接收,通过异步通讯,可以优化... 目录一、RabbitMQ安装二、启动RabbitMQ三、javascript编写Java代码1、引入

MySQL8.0设置redo缓存大小的实现

《MySQL8.0设置redo缓存大小的实现》本文主要在MySQL8.0.30及之后版本中使用innodb_redo_log_capacity参数在线更改redo缓存文件大小,下面就来介绍一下,具有一... mysql 8.0.30及之后版本可以使用innodb_redo_log_capacity参数来更改

spring-boot-starter-thymeleaf加载外部html文件方式

《spring-boot-starter-thymeleaf加载外部html文件方式》本文介绍了在SpringMVC中使用Thymeleaf模板引擎加载外部HTML文件的方法,以及在SpringBoo... 目录1.Thymeleaf介绍2.springboot使用thymeleaf2.1.引入spring

Java实现检查多个时间段是否有重合

《Java实现检查多个时间段是否有重合》这篇文章主要为大家详细介绍了如何使用Java实现检查多个时间段是否有重合,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录流程概述步骤详解China编程步骤1:定义时间段类步骤2:添加时间段步骤3:检查时间段是否有重合步骤4:输出结果示例代码结语作

Java中String字符串使用避坑指南

《Java中String字符串使用避坑指南》Java中的String字符串是我们日常编程中用得最多的类之一,看似简单的String使用,却隐藏着不少“坑”,如果不注意,可能会导致性能问题、意外的错误容... 目录8个避坑点如下:1. 字符串的不可变性:每次修改都创建新对象2. 使用 == 比较字符串,陷阱满

Java判断多个时间段是否重合的方法小结

《Java判断多个时间段是否重合的方法小结》这篇文章主要为大家详细介绍了Java中判断多个时间段是否重合的方法,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录判断多个时间段是否有间隔判断时间段集合是否与某时间段重合判断多个时间段是否有间隔实体类内容public class D

IDEA编译报错“java: 常量字符串过长”的原因及解决方法

《IDEA编译报错“java:常量字符串过长”的原因及解决方法》今天在开发过程中,由于尝试将一个文件的Base64字符串设置为常量,结果导致IDEA编译的时候出现了如下报错java:常量字符串过长,... 目录一、问题描述二、问题原因2.1 理论角度2.2 源码角度三、解决方案解决方案①:StringBui