咱们在pom文件中导入java
<dependency> <groupId>json-taglib</groupId> <artifactId>json-taglib</artifactId> <version>0.4.1</version> </dependency>
这个能够看见json
这个到不进去,maven仓库中没有这个包。maven
解决办法:
1:url
json-taglib依赖:spa
<dependency> <groupId>atg.taglib.json</groupId> <artifactId>json-taglib</artifactId> <version>0.4.1</version> </dependency>
指定仓库:.net
<repositories> <repository> <id>java.net</id> <url>http://maven.jahia.org/maven2</url> </repository> </repositories>
2:code
本身下载json-taglib 0.4.1 jar包安装在本身本地仓库,之后导包就会从本地导包。(推荐)blog
下载地址:https://sourceforge.net/projects/json-taglib/get
下面是一个json包导入命令,能够参考一下:it
mvn install:install-file -DgroupId=<group_name> -DartifactId=<artifact_name> -Dversion=<version_no> -Dfile=<path_of_the_local_jar> -Dpackaging=jar
下面是个人安装命令:
mvn install:install-file -Dfile=C:\Users\liweichuan\Downloads\json-taglib-0.4.1.jar -DgroupId=json-taglib -DartifactId=json-taglib -Dversion=0.4.1 -Dpackaging=jar
附上截图:
就能够正常使用了。