各种依赖

mysql 

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!--jdbc依赖-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    #数据库url
    url: jdbc:mysql://localhost:3306/hxxxx?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
    # 数据库访问账户
    username: lxxxxx
    # 数据库访问密码
    password: bxxxxxx
    dbcp2:                                          # 进行数据库连接池的配置
      min-idle: 5                                  # 数据库连接池的最小维持连接数
      initial-size: 5                               # 初始化提供的连接数
      max-total: 5                                # 最大的连接数
      max-wait-millis: 60000 				# 等待连接获取的最大超时时间

  



redis

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>



posted @ 2022-11-06 14:19  tomcat99  阅读(26)  评论(0)    收藏  举报