基于SSM 和 layui 的增删查改

本文档详细介绍了如何基于SSM(Spring、SpringMVC、MyBatis)框架和layui前端组件库进行后端环境配置,包括maven的设置、TomCat的配置、解决乱码问题、SpringMVC和MyBatis的配置,以及数据库字段的设计。后端部分涵盖了从pojo实体类到mapper映射文件的代码实现。前端部分则涉及到layui和jQuery的资源引入,以及index、add、update三个页面的创建。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

开发工具: IDEA 2021 WebStorm 2021 Mysql 8.0
开发环境:JDK 8 TomCat 8.5.81 apache-maven-3.6.1
技术点:Spring + SpringMVC + Mybatis + Mysql + Html + layui + jquery

一、后端

前提条件:配置好 maven

链接:maven配置

  1. 基础环境搭建

1、导入依赖

打包方式 war

 <groupId>com.demo.ssm</groupId>
    <artifactId>ssm</artifactId>
    <packaging>war</packaging>
<properties>
    <spring.version>5.3.23</spring.version>
</properties>
<!-- 基于Maven依赖传递性,导入spring-context依赖即可导入当前所需所有jar包 -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>5.3.13</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <version>5.3.13</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <!-- mvc -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.5.10</version>
        </dependency>
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis-spring</artifactId>
            <version>2.0.7</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.2.12</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.31</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>com.github.pagehelper</groupId>
            <artifactId>pagehelper</artifactId>
            <version>5.3.1</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.2.11</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>4.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.13.4.2</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>org.thymeleaf</groupId>
            <artifactId>thymeleaf-spring5</artifactId>
            <version>3.0.15.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.24</version>
        </dependency>

②添加web模块

网址:TomCat

③配置TomCat

TomCat Server => Local

2、解决TomCat 乱码问题:-Dfile.encoding=UTF-8

ssm+shiro+layui+easyui实现的后台权限管理系统 项目描述 基于SSM+Shiro+Layui+Easyui实现的后台权限管理系统 丰富的代码注释会很方便于你的理解,清晰的代码层次会让你更清楚的明白企业级架构!希望能在有限的时间帮助你快速的提高自己!学习本项目需要一定的基础哈。 介绍 BM致力于更完善,代码注释更丰富,更易于理解学习的企业级后台管理系统 技术 ssm 框架 , shiro权限管理,layui + easyui 页面技术 功能 1.用户信息管理,2.角色管理,3.资源管理,4.部门资源,5.字典管理,6.日志管理,7.日志图表管理,后期功能陆续更新(boot版等等) 运行环境 jdk8+tomcat8+mysql+IntelliJ IDEA+maven 项目技术(必填) ssm+shiro+layui+easyui 数据库文件 链接:https://pan.baidu.com/s/15wqlVBqwEsB4PQ00rBxIuw 提取码:9yv8 jar包文件 链接:https://pan.baidu.com/s/1HcQq1M-_JCvY7hbuxtDQnQ 提取码:wmtnssm+shiro+layui+easyui实现的后台权限管理系统 项目描述 基于SSM+Shiro+Layui+Easyui实现的后台权限管理系统 丰富的代码注释会很方便于你的理解,清晰的代码层次会让你更清楚的明白企业级架构!希望能在有限的时间帮助你快速的提高自己!学习本项目需要一定的基础哈。 介绍 BM致力于更完善,代码注释更丰富,更易于理解学习的企业级后台管理系统 技术 ssm 框架 , shiro权限管理,layui + easyui 页面技术 功能 1.用户信息管理,2.角色管理,3.资源管理,4.部门资源,5.字典管理,6.日志管理,7.日志图表管理,后期功能陆续更新(boot版等等) 运行环境 jdk8+tomcat8+mysql+IntelliJ IDEA+maven 项目技术(必填) ssm+shiro+layui+easyui 数据库文件 链接:https://pan.baidu.com/s/15wqlVBqwEsB4PQ00rBxIuw 提取码:9yv8 jar包文件 链接:https://pan.baidu.com/s/1HcQq1M-_JCvY7hbuxtDQnQ 提取码:wmtn
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值