zoukankan      html  css  js  c++  java
  • 十四.spring-boot使用mybatis

    在springMVC+spring中使用mybatis已经非常非常的灵活,但是需要配置很多的信息

    一、创建maven web project

    image

    二、创建数据库表

    image

    三、在application.properties文件配置数据库信息

    spring.datasource.url =jdbc:mysql://localhost:3306/AppleforWindows_test1?characterEncoding=utf8&useSSL=true
    spring.datasource.username = root
    spring.datasource.password = AppleforWindows
    spring.datasource.type=MYSQL
    spring.datasource.driverClassName =com.mysql.jdbc.Driver
    spring.datasource.max-active=20
    spring.datasource.max-idle=8
    spring.datasource.min-idle=8
    spring.datasource.initial-size=10

    四、创建测试类

    1、新建一个数据模型

  • 相关阅读:
    B-树与B+树
    RPC原理
    高可用
    Srpingboot与dubbo整合的三种方式
    html
    SQL5
    SQL4
    SQL3
    SQL2
    SQL语句1
  • 原文地址:https://www.cnblogs.com/xxt19970908/p/6736639.html
Copyright © 2011-2022 走看看