跳到主要内容
版本:0.17.0+

maven-howto

use mirrors for repositories

<!-- format -->

<settings>
...
<mirrors>
<mirror>
<id>other-mirror</id>
<name>Other Mirror Repository</name>
<url>https://other-mirror.repo.other-company.com/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
...
</settings>

ref:

下载速度: 华为云>阿里云>腾讯云用户体验: 华为云>腾讯云>阿里云

这帖有一些争论,莫衷一是,需要自己测试。 TODO: 测试是否正在使用 maven 镜像,测试其速度。

config mysql in application.yml

spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
druid:
url: jdbc:mysql://localhost:3306/RoyalTtiger
username: root
password: XXXXX
driver-class-name: com.mysql.cj.jdbc.Driver # old: com.mysql.jdbc.Driver
servlet:
multipart:
max-file-size: 300MB
max-request-size: 800MB

ref:

config mysql in pom

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>

ref: