赞
踩
1.下载jdbc.jar
2.在idea里项目右键导入jar包配置
3.在build.gradle中导入配置
// https://mvnrepository.com/artifact/com.microsoft.sqlserver.jdbc/sqljdbc compile group: 'com.microsoft.sqlserver.jdbc', name: 'sqljdbc', version: '4.0'
4.application.yml配置
spring: datasource: url: jdbc:sqlserver://localhost:1433;DatabaseName=XXXX driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver type: com.alibaba.druid.pool.DruidDataSource username: XXXXX password: XXXXX jpa: hibernate: ddl-auto: update database-platform: org.hibernate.dialect.SQLServerDialect show-sql: true
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。