只在pom.xml中添加如下依赖是无法导入sqljdbc4.jar包的,maven会报错
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
</dependency>
我们上maven仓库能够发现有这么一句提示 this artifact is located at Clojars repository (https://clojars.org/repo/)
这个jar包是在Clojars仓库里面,我们需要在pom.xml中加上如下配置
<repositories>
<repository>
<id>clojars</id>
<url>http://clojars.org/repo/</url>
</repository>
</repositories>
重新刷新下,OK搞定!!