I am trying to build a springboot application, with microsoft sql server connection. I build connection to mysql and it worked fine, but now i cannot connect to my mssql database, because springboot gradle script doesn't load the 'com.microsoft.sqlserver:sqljdbc4' jar. I tried to load the jar via gradle script in a non-springboot project and it worked fine. Is springboot doing something i don't know? Or is there another problem?
My gradle-script:
buildscript {
ext {
springBootVersion = '1.4.0.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
jar {
baseName = 'BEAT-Surflet'
version = '0.0.1-SNAPSHOT'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
compile('com.microsoft.sqlserver:sqljdbc4')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework:spring-jms')
compile('org.apache.activemq:activemq-broker')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
Maybe the problem is, that springboot tries to load the version by himself or conflicting because of it. I tried to exlicit give him the version too ('com.microsoft.sqlserver:sqljdbc4:4.0'), but it didn't work either. So why my gradle-script or my springboot project doesn't load the mssql jar?