title: Spring Boot Unable to load class: com.microsoft.sqlserver.jdbc.SQLServerDriver
body: <p>I've created a new Spring Boot project. I'm trying to setup a DataSource to use MSSQL. However I seem to be getting the error "Unable to load class: com.microsoft.sqlserver.jdbc.SQLServerDriver"</p>
  
  <p>I've placed the file jdbcsql4.jar in a folder in my project /lib/jdbcsq4.jar</p>
  
  <p>In my pom.xml file I've added the following:</p>
  
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;com.microsoft.sqlserver&lt;/groupId&gt;
          &lt;artifactId&gt;sqljdbc4&lt;/artifactId&gt;
          &lt;version&gt;4.0&lt;/version&gt;
          &lt;scope&gt;system&lt;/scope&gt;
          &lt;optional&gt;true&lt;/optional&gt;
          &lt;systemPath&gt;${basedir}/lib/sqljdbc4.jar&lt;/systemPath&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>I have an application.properties file, and I'm defining the database credentials like this:</p>
  
  <pre><code>secondary.datasource.url = jdbc:sqlserver://1.1.1.1:50109
  secondary.datasource.username = sa
  secondary.datasource.password = mypassword
  secondary.datasource.driver-class-name =     com.microsoft.sqlserver.jdbc.SQLServerDriver
  </code></pre>
  
  <p>Can anyone possibly indicate where I may be going wrong?</p>