1. 程式人生 > 其它 >egg上傳圖片到阿里雲伺服器

egg上傳圖片到阿里雲伺服器

springboot

一、整合mybatis

新增依賴

<!--        druid-->
<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>druid</artifactId>
    <version>1.2.8</version>
</dependency>

<!--        mybatis-->
<dependency>
    <groupId>org.mybatis.spring.boot</groupId>
    <artifactId>mybatis-spring-boot-starter</artifactId>
    <version>2.2.2</version>
</dependency>

<!--        JDBC-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>

在yml檔案中配置

mybatis:
  mapper-locations: classpath:mapper/*.xml
  type-aliases-package: com.yyy.pojo

spring:
  datasource:
    username: root
    password: 123456
    url: jdbc:mysql://localhost:3306/bjasd?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC
    driver-class-name: com.mysql.cj.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource