Added support for MS-SQL and Azure SQL DB

Added support for MS-SQL and Azure SQL DB
This commit is contained in:
GuillermoTantachuco
2015-07-13 22:04:29 -05:00
parent ae773dcaf4
commit 0ab513cd94
5 changed files with 55 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package org.springframework.cloud.service.common;
import org.springframework.cloud.service.ServiceInfo;
@ServiceInfo.ServiceLabel("sqlserver")
public class SqlServerServiceInfo extends RelationalServiceInfo {
private static final String JDBC_URL_TYPE = "sqlserver";
public static final String SQLSERVER_SCHEME = JDBC_URL_TYPE;
public SqlServerServiceInfo(String id, String url) {
super(id, url, JDBC_URL_TYPE);
}
@Override
public String getJdbcUrl()
{
return String.format("jdbc:%s://%s:%d;database=%s;user=%s;password=%s;",
jdbcUrlDatabaseType,
getHost(), getPort(), getPath(), getUserName(), getPassword());
}
}