Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 在春季启动应用程序中连接到azure ms sqlserver_Sql Server_Azure_Spring Boot - Fatal编程技术网

Sql server 在春季启动应用程序中连接到azure ms sqlserver

Sql server 在春季启动应用程序中连接到azure ms sqlserver,sql-server,azure,spring-boot,Sql Server,Azure,Spring Boot,我正在尝试连接到azure ms sqlserver数据库。我已在application.properties文件中设置了这些属性,但出现异常,连接超时 spring.datasource.url=jdbc:jtds:sqlserver://xxxserver.database.windows.net:port;DatabaseName=xxxdb;user=xxxadmin@xxxserver;password=passwd;encrypt=true;trustServerCertificat

我正在尝试连接到azure ms sqlserver数据库。我已在application.properties文件中设置了这些属性,但出现异常,连接超时

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
我得到一个例外:

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.<init>(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]
2016-02-16 23:36:46.645错误7840---[main]o.a.tomcat.jdbc.pool.ConnectionPool:无法创建池的初始连接。
java.sql.SQLException:登录超时。
在net.sourceforge.jtds.jdbc.JtdsConnection.(JtdsConnection.java:433)~[jtds-1.3.1.jar:1.3.1]
在net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)~[jtds-1.3.1.jar:1.3.1]
在org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:307)~[tomcat-jdbc-8.0.30.jar:na]
在org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:200)~[tomcat-jdbc-8.0.30.jar:na]
在org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:708)[tomcat-jdbc-8.0.30.jar:na]
在org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:642)[tomcat-jdbc-8.0.30.jar:na]
位于org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:464)[tomcat-jdbc-8.0.30.jar:na]

过去,由于驱动程序在协商SSL加密握手时遇到问题,jtds驱动程序与azure sql之间存在问题。 推荐的驱动程序是Microsoft驱动程序

更多信息请点击此处:

过去,由于驱动程序在协商SSL加密握手时遇到问题,jtds驱动程序与azure sql之间存在问题。 推荐的驱动程序是Microsoft驱动程序

更多信息请点击此处:

但microsoft sql驱动程序没有maven repo。我必须在本地保存它才能访问它,但是如果我必须在生产环境中移动它,我该怎么做呢?但是microsoft sql驱动程序没有maven repo。我必须在本地保存它才能访问它,但如果我必须将它移动到生产环境中,我该如何做呢?