1.添加依赖 <!-- sqlserver--> <dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>sqljdbc4</artifactId> <version>4.0</version> <scope>runtime</scope> </dependency>
2.修改yml配置文件
2.1、修改数据库连接
url: jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=j_report username: sa password: 123 driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
2.2、修改数据库连接池druid配置 #使用sqlserver,修改druid配置 validationQuery: SELECT 1 filters: stat,slf4j