javaweb简单的登录增删改查系统_Spring Boot 整合微信小程序实现登录与增删改查

优质文章,及时送达

项目描述:在微信小程序中通过与Springboot操作数据库实现简单的增删改查,其中我是用springboot整合mybatis-plus 和mysql使用的

1. 开发前准备

1.1 前置知识

  • java基础

  • SpringBoot简单基础知识

1.2 环境参数

  • 开发工具:IDEA

  • 基础环境:Maven+JDK8

  • 主要技术:SpringBoot、lombok、mybatis-plus、mysql 、微信小程序

  • SpringBoot版本:2.2.6

2.开发者服务器

项目结构:

Ry0MpUt3M8hNqX

2.1 初始配置

(1)pom.xml配置

 org.springframework.boot
spring-boot-starter-weborg.mybatis.spring.boot
mybatis-spring-boot-starter2.1.1org.springframework.boot
spring-boot-starter-thymeleafcom.alibaba
druid1.1.14mysql
mysql-connector-java5.1.42runtimecom.baomidou
mybatis-plus-boot-starter3.1.0org.projectlombok
lomboktruecom.github.pagehelper
pagehelper-spring-boot-starter1.2.5junit
junittestorg.springframework.boot
spring-boot-starter-testtestorg.junit.vintage
junit-vintage-engine

org.springframework.boot
spring-boot-maven-plugin


(2)application.yml

# Spring Boot 的数据源配置
spring:
datasource:
name: wx
url: jdbc:mysql://localhost:3306/wx_mini_program?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertTo&useSSL=true&serverTimezone=GMT%2B8
username: root
password: root
# 使用druid数据源
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
filters: stat
maxActive: 20 initialSize: 1 maxWait: 60000 minIdle: 1 timeBetweenEvictionRunsMillis: 60000 minEvictableIdleTimeMillis: 300000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false testOnReturn: false poolPreparedStatements: true maxPoolPreparedStatementPerConnectionSize: 20 maxOpenPreparedStatements: 20 # mybatis-plus相关配置
mybatis-plus:
# xml扫描,多个目录用逗号或者分号分隔(告诉 Mapper 所对应的 XML 文件位置)
mapper-locations: classpath:mapper/*.xml
# 以下配置均有默认值,可以不设置
global-config:
db-config:
#主键类型 AUTO:"数据库ID自增" INPUT:"用户输入ID
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值