title: connect to azure ms sqlserver in spring boot application
body: <p>I'm trying to connect to the azure ms sqlserver database. I have setup these properties in the application.properties file, but I get exceptions, connection timed out.</p>
  
  <pre><code>spring.datasource.url=jdbc:jtds:sqlserver://xxxserver.database.windows.net:port;DatabaseName=xxxdb;user=xxxadmin@xxxserver;password=passwd;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;
  spring.datasource.username=xxxadmin@xxxserver
  spring.datasource.password=passwd
  spring.datasource.driver-class-name=net.sourceforge.jtds.jdbc.Driver
  
  spring.jpa.hibernate.ddl-auto=update
  </code></pre>
  
  <p>I get this exception:</p>
  
  <pre><code>2016-02-16 23:36:46.645 ERROR 7840 --- [           main] o.a.tomcat.jdbc.pool.ConnectionPool      : Unable to create initial connections of pool.
  
  java.sql.SQLException: Login timed out.
      at net.sourceforge.jtds.jdbc.JtdsConnection.&lt;init&gt;(JtdsConnection.java:433) ~[jtds-1.3.1.jar:1.3.1]
      at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184) ~[jtds-1.3.1.jar:1.3.1]
      at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:307) ~[tomcat-jdbc-8.0.30.jar:na]
      at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:200) ~[tomcat-jdbc-8.0.30.jar:na]
      at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:708) [tomcat-jdbc-8.0.30.jar:na]
      at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:642) [tomcat-jdbc-8.0.30.jar:na]
      at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:464) [tomcat-jdbc-8.0.30.jar:na]
  </code></pre>