链接 🔗

  • MVNRepository

    安装

    添加依赖:
    1. <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
    2. <dependency>
    3. <groupId>mysql</groupId>
    4. <artifactId>mysql-connector-java</artifactId>
    5. <version>8.0.18</version>
    6. </dependency>

配置 application.proterties

  1. ### MySQL 连接信息
  2. spring.datasource.url=jdbc:mysql://localhost:3306/database
  3. spring.datasource.username=username
  4. spring.datasource.password=password
  5. spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver