pom.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>untitled</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-typehandlers-jsr310</artifactId>
<version>3.4.2</version>
</dependency>
</dependencies>
</project>
本地maven的setting.xml文件部分内容:
<localRepository>D:/apache-maven-3.6.3/conf/repository</localRepository>
...
...
<mirrors>
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
本地maven有安装:
IDEA的Maven设置项:
报错:
Could not transfer artifact org.mybatis:mybatis-typehandlers-jsr310:pom:3.4.2 from/to nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public">): Illegal character in path at index 51: http://maven.aliyun.com/nexus/content/groups/public">/org/mybatis/mybatis-typehandlers-jsr310/3.4.2/mybatis-typehandlers-jsr310-3.4.2.pom
【解决办法】
直接去阿里云maven仓库官网(https://maven.aliyun.com/mvn/view),搜索并下载所需的mybatis版本,再解压,然后将整个文件夹复制到本地maven的本地仓库。