jdk8对应的sqljdbc42下载地址:http://www.microsoft.com/en-us/download/details.aspx?spm=a2c4e.10696291.0.0.4e4519a4NdcSJ7&displaylang=en&id=11774
在sqljdbc4.jar的路径下,打开命令行输入:
$ mvn install:install-file -Dfile=sqljdbc42.jar -Dpackaging=jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc42 -Dversion=6.0
在maven里引用:
<dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>sqljdbc42</artifactId> <version>6.0</version> </dependency>