- 在resources文件下新建lib文件夹,将jar包放到该文件夹下。
2.在pom.xml文件中这样引入:
<dependency>
<groupId>com.sqljdbc</groupId>
<artifactId>com.sqljdbc4</artifactId>
<version>4.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/sqljdbc4.jar</systemPath>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>
完成!