1.数据源配置修改
<!--sqlserver-->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<scope>runtime</scope>
</dependency>
spring:
application:
name: spring-cloud-consumer
datasource:
name: demo
url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=demo
username: sa
password: 123456
#使用druid数据源
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver