springboot+easyui+mybatis实现数据库信息增删改

本文介绍了如何使用SpringBoot、EasyUI和Mybatis框架实现数据库的增删改查功能。在前端HTML页面上,用户可以进行信息修改,保存的数据将同步到后台数据库。通过详细步骤,包括mapper、Service、Controller和js文件的代码讲解,展示了项目的具体实现。项目源码已上传至码云。

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

       基于springboot框架的前后台数据交互显示

       主要实现在前台html页面对数据库进行增删改的操作,通过在前台修改用户的信息,保存到后台数据库,同时,将更新后的信息从数据库进行读取。
       今天这篇博客是对我前面的一个信息修改功能进行完善。代码相对前面的一篇博客更加简洁。

       项目目录结构图如下所示。

目录结构

1 前台html页面代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" xmlns:float="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8"/>
    <link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="easyui/themes/icon.css"/>
    <link rel="stylesheet" type="text/css" href="easyui/demo/demo.css"/>
    <script type="text/javascript" src="easyui/jquery.min.js"></script>
    <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="easyui/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="js1/manageruser.js"></script>
</head>

<body>
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'north'" style="width: 100%;height: 9%">
    </div>

    <div data-options="region:'center',title:'用户列表'">
        <table id="datagrid"  class="easyui-datagrid" style="width:100%;height:100%"
               url="/stuinforlist"
               toolbar="#dgtoolbar" pagination="true"
               pageSize="25"    pageList="[25,15,10]"
               rownumbers="false" fitColumns="true" singleSelect="true" >
            <thead>
            <tr>
                <th data-options="field:'sno',align:'center',width:'9%'">工号</th>
                <th data-options="field:'sname',align:'center',width:'9%'">姓名</th>
                <th data-options="field:'password',align:'center',width:'9%'">密码</th>
                <th data-options="field:'tno',align:'center',width:'11%'">课程号</th>
                <th data-options="field:'tname',align:'center',width:'9%'">课程名</th>
                <th data-options="field:'tgrade',align:'center',width:'9%'">成绩</th>
            </tr>
            </thead>
        </table>
        <div id="dgtoolbar">
            <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newUsers()">添加用户</a>
            <a href="#" class="easyui-linkbutton" iconCls="icon-cut" plain="true" onclick="removeUsers()">删除用户</a>
            <a href="#" class="easyui-l
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值