【Spring Boot+Thymeleaf+MyBatis+mysql】实现电子商务平台实战(附源码)持续更新~~ 包括sql语句、java、html代码

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS PostgreSQL,高可用系列 2核4GB
云数据库 RDS MySQL,高可用系列 2核4GB
简介: 【Spring Boot+Thymeleaf+MyBatis+mysql】实现电子商务平台实战(附源码)持续更新~~ 包括sql语句、java、html代码

源码请点赞关注收藏后评论区留言和私信博主

开发环境:Web服务器使用Servlet容器,数据库采用mysql,集成开发环境为Spring Tool Suite(STS)

一、系统设计

电子商务平台分为两个子系统 一个是后台管理系统 一个是电子商务系统,下面分别讲解着两个子系统的功能需要与模块划分

系统功能需求

1:后台管理子系统

要求管理员登录成功后,才能对商品进行管理,包括添加商品,查询商品,修改商品以及删除商品,除商品管理外,管理员还需要对商品类型,注册用户以及用户的订单等进行管理

2:电子商务子系统

(1):非注册用户

具有浏览首页,查看商品详情以及搜索商品的功能

(2):注册用户

还可以购买商品,查看购物车,收藏商品,查看订单等等

系统模块划分

1:后台管理子系统

模块划分如下

2:电子商务子系统

模块划分如下

二、数据库设计

系统采用加载纯Java数据库驱动程序的方式连接MYSQL数据库,创建数据库shop并创建8张系统表 数据库E-R图如下

建表的sql语句此处省略 需要请点赞关注收藏后私信博主

部分sql语句如下

/*
Navicat MySQL Data Transfer
Source Server         : testSpringMVC
Source Server Version : 50519
Source Host           : localhost:3306
Source Database       : shop
Target Server Type    : MYSQL
Target Server Version : 50519
File Encoding         : 65001
Date: 2019-10-08 07:41:20
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `ausertable`
-- ----------------------------
DROP TABLE IF EXISTS `ausertable`;
CREATE TABLE `ausertable` (
  `aname` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `apwd` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`aname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- ----------------------------
-- Records of ausertable
-- ----------------------------
INSERT INTO ausertable VALUES ('admin', 'admin');
-- ----------------------------
-- Table structure for `busertable`
-- ----------------------------
DROP TABLE IF EXISTS `busertable`;
CREATE TABLE `busertable` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `bemail` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `bpwd` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- ----------------------------
-- Records of busertable
-- ----------------------------
INSERT INTO busertable VALUES ('6', 'chenhengdl@126.com', '78f8a7ae700c91db09facb05a675432b');
-- ----------------------------
-- Table structure for `carttable`
-- ----------------------------
还没弄
DROP TABLE IF EXISTS `carttable`;
CREATE TABLE `carttable` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `busertable_id` int(11) NOT NULL,
  `goodstable_id` int(11) NOT NULL,
  `shoppingnum` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `bid` (`busertable_id`),
  KEY `gno` (`goodstable_id`),
  CONSTRAINT `bid` FOREIGN KEY (`busertable_id`) REFERENCES `busertable` (`id`),
  CONSTRAINT `gno` FOREIGN KEY (`goodstable_id`) REFERENCES `goodstable` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- ----------------------------
-- Records of carttable
-- ----------------------------
-- ----------------------------
-- Table structure for `focustable`
-- ----------------------------
还没弄
DROP TABLE IF EXISTS `focustable`;
CREATE TABLE `focustable` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `goodstable_id` int(11) NOT NULL,
  `busertable_id` int(11) NOT NULL,
  `focustime` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `gno1` (`goodstable_id`),
  KEY `bid1` (`busertable_id`),
  CONSTRAINT `bid1` FOREIGN KEY (`busertable_id`) REFERENCES `busertable` (`id`),
  CONSTRAINT `gno1` FOREIGN KEY (`goodstable_id`) REFERENCES `goodstable` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- ----------------------------
-- Records of focustable
-- ----------------------------
INSERT INTO focustable VALUES ('5', '29', '6', '2019-10-05 14:55:51');
-- ----------------------------
-- Table structure for `goodstable`
-- ----------------------------
还没弄
DROP TABLE IF EXISTS `goodstable`;
CREATE TABLE `goodstable` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `gname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `goprice` double DEFAULT NULL,
  `grprice` double DEFAULT NULL,
  `gstore` int(11) DEFAULT NULL,
  `gpicture` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `isRecommend` tinyint(2) DEFAULT NULL,
  `isAdvertisement` tinyint(2) DEFAULT NULL,
  `goodstype_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `typeid` (`goodstype_id`),
  CONSTRAINT `typeid` FOREIGN KEY (`goodstype_id`) REFERENCES `goodstype` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- ----------------------------
-- Records of goodstable
-- ----------------------------
INSERT INTO goodstable VALUES ('26', '广告商品4', '90', '80', '1000', '201910274135059473.jpg', '0', '1', '2');
INSERT INTO goodstable VALUES ('27', '广告商品5', '80', '30', '122', '201910274135126352.jpg', '0', '1', '3');
INSERT INTO goodstable VALUES ('28', '抱枕11号', '100', '20', '200', '201910274135150096.jpg', '1', '0', '14');
INSERT INTO goodstable VALUES ('29', '抱枕22号', '300', '200', '180', '201910274135212497.jpg', '1', '0', '15');
INSERT INTO goodstable VALUES ('32', '抱枕99', '80', '70', '80', '201910280135330014.jpg', '1', '0', '14');
DROP TABLE IF EXISTS `orderdetail`;
CREATE TABLE `orderdetail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `orderbasetable_id` int(11) NOT NULL,
  `goodstable_id` int(11) NOT NULL,
  `shoppingnum` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `odsn` (`orderbasetable_id`),
  KEY `gno3` (`goodstable_id`),
  CONSTRAINT `gno3` FOREIGN KEY (`goodstable_id`) REFERENCES `goodstable` (`id`),
  CONSTRAINT `odsn` FOREIGN KEY (`orderbasetable_id`) REFERENCES `orderbasetable` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- ----------------------------
-- Records of orderdetail
-- ----------------------------
INSERT INTO orderdetail VALUES ('5', '3', '29', '20');
INSERT INTO orderdetail VALUES ('6', '4', '33', '20');

建表后效果如下

 

三、系统管理

1:添加相关依赖

在pom.xml文件中添加如下代码

<!-- 添加MySQL依赖 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.45</version>
<!-- MySQL8.x时,请使用8.x的连接器 -->
</dependency>
<!-- MyBatis-Spring,Spring Boot应用整合MyBatis框架的核心依赖配置 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<!-- 由于commons-fileupload组件不属于Spring Boot,所以需要加上版本 -->
<version>1.3.3</version>
</dependency>

应用的目录结构如下

 

 

在配置文件application.properties中添加如下代码

server.servlet.context-path=/eBusiness
###
##数据源信息配置
###
#数据库地址
spring.datasource.url=jdbc:mysql://localhost:3306/shop?characterEncoding=utf8
#数据库MySQL为8.x时,url为jdbc:mysql://localhost:3306/springbootjpa?useSSL=false&serverTimezone=Asia/Beijing&characterEncoding=utf-8
#数据库用户名
spring.datasource.username=root
#数据库密码
spring.datasource.password=root
#数据库驱动
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#设置包别名(在Mapper映射文件中直接使用实体类名)
mybatis.type-aliases-package=com.ch.ebusiness.entity
#告诉系统在哪里去找mapper.xml文件(映射文件)
mybatis.mapperLocations=classpath:mappers/*.xml
#在控制台输出SQL语句日志
logging.level.com.ch.ebusiness.repository=debug
#关闭Thymeleaf模板引擎缓存(使页面热部署),默认是开启的
spring.thymeleaf.cache=false
#上传文件时,默认单个上传文件大小是1MB,max-file-size设置单个上传文件大小
spring.servlet.multipart.max-file-size=50MB
#默认总文件大小是10MB,max-request-size设置总上传文件大小
spring.servlet.multipart.max-request-size=500MB

四、组件设计

包括 管理员登录权限验证 前台用户登录权限验证 验证码 统一异常处理 工具类等等

五、后台管理子系统的实现

管理员登录界面如下

代码如下

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>管理员登录页面</title>
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" />
<body>
  <div class="container">
      <div class="bg-primary"  style="width:70%; height: 60px;padding-top: 1px;">
         <h3 align="center">管理员登录</h3>
     </div>
    <br>
    <br>
    <form th:action="@{/admin/login}" name="myform" method="post" th:object="${aUser}"  class="form-horizontal" role="form" >
      <div class="form-group has-success">
        <label class="col-sm-2 col-md-2 control-label">用户名</label>
        <div class="col-sm-4 col-md-4">
          <input type="text" class="form-control"
           placeholder="请输入管理员名"
          th:field="*{aname}"/>
          <span th:errors="*{aname}"></span>
        </div>
      </div>
      <div class="form-group has-success">
          <label class="col-sm-2 col-md-2 control-label">密码</label>
          <div class="col-sm-4 col-md-4">
              <input type="password" class="form-control"
           placeholder="请输入您的密码" th:field="*{apwd}"/>
           <span th:errors="*{apwd}"></span>
          </div>
       </div>
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <button type="submit"class="btn btn-success" >登录</button>
          <button type="reset" class="btn btn-primary" >重置</button>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <font size="6" color="red">
            <span th:text="${errorMessage }"></span>
          </font>
        </div>
      </div>
    </form>
  </div>
</body>
</html>

类型管理界面如下 包括增删改查

添加类型页面代码如下

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>商品类型添加页面</title>
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" />
<body>
  <div th:include="admin/header"></div>
  <br><br><br>
  <div class="container">
    <div class="bg-primary"  style="width:70%; height: 60px;padding-top: 0.5px;">
         <h3 align="center">添加类型</h3>
     </div><br>
    <form th:action="@{/type/addType}" name="myform" method="post" th:object="${goodsType}"  class="form-horizontal" role="form" >
      <div class="form-group has-success">
        <label class="col-sm-2 col-md-2 control-label">类型名称</label>
        <div class="col-sm-4 col-md-4">
          <input type="text" class="form-control"
           placeholder="请输入类型名"
          th:field="*{typename}"/>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <button type="submit"class="btn btn-success" >添加</button>
          <button type="reset" class="btn btn-primary" >重置</button>
        </div>
      </div>
    </form>
  </div>
</body>
</html>

添加商品效果如下

代码如下

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>商品类型添加页面</title>
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" />
<body>
  <div th:include="admin/header"></div>
  <br><br><br>
  <div class="container">
    <div class="bg-primary"  style="width:70%; height: 60px;padding-top: 0.5px;">
         <h3 align="center">添加商品</h3>
     </div><br>
    <form th:action="@{/goods/addGoods?act=add}"
     name="myform" method="post" 
     th:object="${goods}"  
     class="form-horizontal" 
     enctype="multipart/form-data" >
      <div class="form-group has-success">
        <label class="col-sm-2 col-md-2 control-label">商品名称</label>
        <div class="col-sm-4 col-md-4">
          <input type="text" class="form-control"
           placeholder="请输入商品名"
          th:field="*{gname}"/>
        </div>
      </div>
      <div class="form-group has-success">
        <label class="col-sm-2 col-md-2 control-label">商品原价</label>
        <div class="col-sm-4 col-md-4">
          <input type="number" class="form-control"
           placeholder="请输入商品原价"
          th:field="*{goprice}"/>
        </div>
      </div>
      <div class="form-group has-success">
        <label class="col-sm-2 col-md-2 control-label">商品折扣价</label>
        <div class="col-sm-4 col-md-4">
          <input type="number" class="form-control"
           placeholder="请输入商品折扣价"
          th:field="*{grprice}"/>
        </div>
      </div>
      <div class="form-group has-success">
        <label class="col-sm-2 col-md-2 control-label">商品库存</label>
        <div class="col-sm-4 col-md-4">
          <input type="number" class="form-control"
           placeholder="请输入商品库存"
          th:field="*{gstore}"/>
        </div>
      </div>
      <div class="form-group has-success">
          <label class="col-sm-2 col-md-2 control-label">商品图片</label>
          <div class="col-sm-4 col-md-4">
              <input type="file" placeholder="请选择商品图片"  class="form-control" name="fileName"/>
          </div>
       </div>
      <div class="form-group has-success">
        <label class="col-sm-2 col-md-2 control-label">是否推荐</label>
        <div class="col-sm-4 col-md-4 radio">
          <label> 
            <input type="radio" th:field="*{isRecommend}" value="1">是
          </label>
          <label> 
            <input type="radio"  th:field="*{isRecommend}" value="0">否
          </label>
        </div>
      </div>
      <div class="form-group has-success">
        <label class="col-sm-2 col-md-2 control-label">是否广告</label>
        <div class="col-sm-4 col-md-4 radio">
          <label> 
            <input type="radio" th:field="*{isAdvertisement}" value="1">是
          </label>
          <label> 
            <input type="radio"    th:field="*{isAdvertisement}"s  value="0">否
          </label>
        </div>
      </div>
      <div class="form-group has-success">
        <label class="col-sm-2 col-md-2 control-label">商品类型</label>
        <div class="col-sm-4 col-md-4">
          <select class="form-control" th:field="*{goodstype_id}">
                        <option th:each="gty:${goodsType}" th:value="${gty.id}" th:text="${gty.typename}">
          </select>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <button type="submit"class="btn btn-success" >添加</button>
          <button type="reset" class="btn btn-primary" >重置</button>
        </div>
      </div>
    </form>
  </div>
</body>
</html>

其余的删除修改页面此处省略 有需要者点赞关注收藏后评论区留言或私信博主

六、前台商务子系统的实现

导航页效果如下 点击即可跳转到其他页面

代码如下

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>导航页</title>
<base th:href="@{/}"><!-- 不用base就使用th:src="@{/js/jquery.min.js} -->
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<style type="text/css">
     .carousel{
         height: 200px;
         background-color: #000;
      }
      .carousel .item{
         height: 200px;
         background-color: #000;
      }
      .carousel img{
         width: 100%;
      }
</style>
</head>
<body>
  <div class="container-fruid">
    <div class="navbar navbar-default navbar-fixed-top" role="navigation"
      style="padding-left: 30px;">
      <div class="navbar-header">
        <span class="navbar-brand">欢迎光临eBusiness</span>
      </div>
      <ul class="nav navbar-nav">
        <li><a th:href="@{user/toRegister}">注册</a></li>
        <li>
          <a th:href="(${session.bUser} == null)?'user/toLogin':'#'" >
            <span th:if="${session.bUser} == null" >
              登录
            </span>
            <span th:if="${session.bUser} != null" >
              欢迎<span th:text="${session.bUser.bemail}" ></span>
            </span>
          </a>
        </li>
        <li><a th:href="@{admin/toLogin}">后台</a></li>
      </ul>
      <ul class="nav navbar-nav navbar-right" style="padding-right: 30px;">
        <li><a href="cart/userInfo">个人信息</a></li>
        <li><a href="cart/selectCart">我的购物车</a></li>
        <li><a href="cart/myFocus">我的收藏</a></li>
        <li><a href="cart/myOder">我的订单</a></li>
        <li class="dropdown"><a href="##" data-toggle="dropdown"
          class="dropdown-toggle">关于我们<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="##">联系我们</a></li>
            <li><a href="##">投诉建议</a></li>
          </ul>
        </li>
      </ul>
    </div>
    <!-- ************************************************** -->
    <div id="carousel-example-generic" class="carousel slide"
      data-ride="carousel" style="margin-top: 20px;">
      <!-- Indicators 小圆圈-->
      <ol class="carousel-indicators">
        <li data-target="#carousel-example-generic" 
        th:each="advertise,adstat:${advertisementGoods}" 
        th:data-slide-to="${adstat.index}"
        th:class="(${adstat.index}==0)? 'active' : ''"></li>
      </ol>
      <!-- 滚动广告图片 -->
      <div class="carousel-inner" role="listbox">
        <div th:each="advertise,adstat:${advertisementGoods}" th:class="(${adstat.index}==0)? 'item active' : 'item'">
          <img th:src="'images/' + ${advertise.gpicture}" th:alt="${adstat.index + 1}">
          <div class="carousel-caption"><span th:text="${advertise.gname}"></span></div>
        </div>
      </div>
      <!-- Controls -->
      <a class="left carousel-control" href="#carousel-example-generic"
        role="button" data-slide="prev"> <span
        class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
      </a> <a class="right carousel-control" href="#carousel-example-generic"
        role="button" data-slide="next"> <span
        class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
      </a>
    </div>
    <!-- *************************************** -->
    <div class="navbar navbar-default " role="navigation">
      <ul class="nav navbar-nav" style="padding-left: 50px;">
        <li><a th:href="@{/}">首页</a></li>
        <li th:each="gty:${goodsType}"><a th:href="'?tid=' + ${gty.id}"><span th:text="${gty.typename}"></span></a></li>
      </ul>
      <form action="search" class="navbar-form navbar-right"
        style="padding-right: 50px;">
        <div class="form-group">
          <input type="text" class="form-control" name="mykey" placeholder="请输入关键词" />
        </div>
        <button type="submit" class="btn btn-default">搜索</button>
      </form>
    </div>
  </div>
</body>
</html>

商品详情页面如下

代码如下

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="@{/}"><!-- 不用base就使用th:src="@{/js/jquery.min.js} -->
<meta charset="UTF-8">
<title>商品页面</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<script src="js/jquery.min.js"></script>
<script type="text/javascript" th:inline="javascript">
  function focus(){
      $.ajax(
        {
          //请求路径,要注意的是url和th:inline="javascript"
          url : [[@{/cart/focus}]],
          //请求类型
          type : "post",
          contentType : "application/json",
          //data表示发送的数据
          data : JSON.stringify({
            id : $("#gid").val()
          }),
          //成功响应的结果
          success : function(obj){//obj响应数据
            if(obj == "no"){
              alert("您已收藏该商品!");
            }else if(obj == "ok"){
              alert("成功收藏该商品");
            }else{
              alert("您没有登录,请登录!");
            }
          },
              error : function() {
                  alert("处理异常!");
              }
        } 
      );
  }
  function putCart(){
    if(!(/(^[1-9]\d*$)/.test($("#buyNumber").val()))){
      alert("购买量请输入正整数!");
      $("#buyNumber").focus();
      return;
    }
    if(parseInt($("#buyNumber").val()) > parseInt($("#gstore").text())){
      alert("购买量超出库存!");
      $("#buyNumber").focus();
      return;
    }
    //获取路径
    var pathName=window.document.location.pathname;
    //截取,得到项目名称
    var projectName=pathName.substring(0,pathName.substr(1).indexOf('/')+1);
    window.location.href = projectName + "/cart/putCart?id=" +  $("#gid").val() + "&buyNumber=" + $("#buyNumber").val();
  }
</script>
</head>
<body>
  <!-- 加载header.html -->
  <div th:include="user/header"></div>
  <div class="container">
    <div class="row">
      <div class="col-xs-6 col-md-3">
        <img
          th:src="'images/' + ${goods.gpicture}"
          style="height: 220px; width: 280px; display: block;">
      </div>
      <div class="col-xs-6 col-md-3">
        <p>商品名:<span th:text="${goods.gname}"></span></p>
        <p>
          商品折扣价:<span style="color: red;">&yen;
            <span th:text="${goods.grprice}"></span>
          </span>
        </p>
        <p>
          商品原价:
          <span class="text-dark" style="text-decoration: line-through;"> &yen;
            <span th:text="${goods.goprice}"></span>
          </span>
        </p>
        <p>
          商品类型:<span th:text="${goods.typename}"></span>
        </p>
        <p>
          库存:<span id="gstore"  th:text="${goods.gstore}"></span>
        </p>
        <p>
          <input type="text" size="12" class="form-control" placeholder="请输入购买量" id="buyNumber" name="buyNumber"/>
          <input type="hidden" name="gid" id="gid" th:value="${goods.id}"/>
        </p>
        <p>
          <a href="javascript:focus()" class="btn btn-primary"
            style="font-size: 10px;">加入收藏</a>
          <a href="javascript:putCart()" class="btn btn-success"
            style="font-size: 10px;">加入购物车</a>
        </p>
      </div>
    </div>
  </div>
</body>
</html>

测试效果如下

如果账号密码不对则弹出错误窗口

 

 

还有用户注册 登录页面 购物车 下单页面 个人信息 我的收藏页面等等此处省略

需要源码请点赞关注收藏后评论区留言或 私信博主即可

相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
3月前
|
前端开发 Java 关系型数据库
基于Java+Springboot+Vue开发的鲜花商城管理系统源码+运行
基于Java+Springboot+Vue开发的鲜花商城管理系统(前后端分离),这是一项为大学生课程设计作业而开发的项目。该系统旨在帮助大学生学习并掌握Java编程技能,同时锻炼他们的项目设计与开发能力。通过学习基于Java的鲜花商城管理系统项目,大学生可以在实践中学习和提升自己的能力,为以后的职业发展打下坚实基础。技术学习共同进步
268 7
|
22天前
|
Java 数据库连接 数据库
Spring boot 使用mybatis generator 自动生成代码插件
本文介绍了在Spring Boot项目中使用MyBatis Generator插件自动生成代码的详细步骤。首先创建一个新的Spring Boot项目,接着引入MyBatis Generator插件并配置`pom.xml`文件。然后删除默认的`application.properties`文件,创建`application.yml`进行相关配置,如设置Mapper路径和实体类包名。重点在于配置`generatorConfig.xml`文件,包括数据库驱动、连接信息、生成模型、映射文件及DAO的包名和位置。最后通过IDE配置运行插件生成代码,并在主类添加`@MapperScan`注解完成整合
Spring boot 使用mybatis generator 自动生成代码插件
|
2月前
|
JavaScript Java 关系型数据库
家政系统源码,java版本
这是一款基于SpringBoot后端框架、MySQL数据库及Uniapp移动端开发的家政预约上门服务系统。
家政系统源码,java版本
|
1月前
|
SQL Java 数据库
解决Java Spring Boot应用中MyBatis-Plus查询问题的策略。
保持技能更新是侦探的重要素质。定期回顾最佳实践和新技术。比如,定期查看MyBatis-Plus的更新和社区的最佳做法,这样才能不断提升查询效率和性能。
77 1
|
1月前
|
存储 安全 Java
Java 集合面试题从数据结构到 HashMap 源码剖析详解及长尾考点梳理
本文深入解析Java集合框架,涵盖基础概念、常见集合类型及HashMap的底层数据结构与源码实现。从Collection、Map到Iterator接口,逐一剖析其特性与应用场景。重点解读HashMap在JDK1.7与1.8中的数据结构演变,包括数组+链表+红黑树优化,以及put方法和扩容机制的实现细节。结合订单管理与用户权限管理等实际案例,展示集合框架的应用价值,助你全面掌握相关知识,轻松应对面试与开发需求。
113 3
|
2月前
|
供应链 JavaScript 前端开发
Java基于SaaS模式多租户ERP系统源码
ERP,全称 Enterprise Resource Planning 即企业资源计划。是一种集成化的管理软件系统,它通过信息技术手段,将企业的各个业务流程和资源管理进行整合,以提高企业的运营效率和管理水平,它是一种先进的企业管理理念和信息化管理系统。 适用于小微企业的 SaaS模式多租户ERP管理系统, 采用最新的技术栈开发, 让企业简单上云。专注于小微企业的应用需求,如企业基本的进销存、询价,报价, 采购、销售、MRP生产制造、品质管理、仓库库存管理、财务应收付款, OA办公单据、CRM等。
176 23
|
22天前
|
Java 调度 流计算
基于Java 17 + Spring Boot 3.2 + Flink 1.18的智慧实验室管理系统核心代码
这是一套基于Java 17、Spring Boot 3.2和Flink 1.18开发的智慧实验室管理系统核心代码。系统涵盖多协议设备接入(支持OPC UA、MQTT等12种工业协议)、实时异常检测(Flink流处理引擎实现设备状态监控)、强化学习调度(Q-Learning算法优化资源分配)、三维可视化(JavaFX与WebGL渲染实验室空间)、微服务架构(Spring Cloud构建分布式体系)及数据湖建设(Spark构建实验室数据仓库)。实际应用中,该系统显著提升了设备调度效率(响应时间从46分钟降至9秒)、设备利用率(从41%提升至89%),并大幅减少实验准备时间和维护成本。
89 0
|
22天前
|
人工智能 运维 关系型数据库
数据库运维:mysql 数据库迁移方法-mysqldump
本文介绍了MySQL数据库迁移的方法与技巧,重点探讨了数据量大小对迁移方式的影响。对于10GB以下的小型数据库,推荐使用mysqldump进行逻辑导出和source导入;10GB以上可考虑mydumper与myloader工具;100GB以上则建议物理迁移。文中还提供了统计数据库及表空间大小的SQL语句,并讲解了如何使用mysqldump导出存储过程、函数和数据结构。通过结合实际应用场景选择合适的工具与方法,可实现高效的数据迁移。
161 1
|
2月前
|
负载均衡 算法 关系型数据库
大数据大厂之MySQL数据库课程设计:揭秘MySQL集群架构负载均衡核心算法:从理论到Java代码实战,让你的数据库性能飙升!
本文聚焦 MySQL 集群架构中的负载均衡算法,阐述其重要性。详细介绍轮询、加权轮询、最少连接、加权最少连接、随机、源地址哈希等常用算法,分析各自优缺点及适用场景。并提供 Java 语言代码实现示例,助力直观理解。文章结构清晰,语言通俗易懂,对理解和应用负载均衡算法具有实用价值和参考价值。
大数据大厂之MySQL数据库课程设计:揭秘MySQL集群架构负载均衡核心算法:从理论到Java代码实战,让你的数据库性能飙升!
|
4月前
|
关系型数据库 MySQL Java
【YashanDB知识库】原生mysql驱动配置连接崖山数据库
【YashanDB知识库】原生mysql驱动配置连接崖山数据库
【YashanDB知识库】原生mysql驱动配置连接崖山数据库

热门文章

最新文章