![](/img/trans.png)
[英]How to specify Kafka AdminClientConfig (Kafka Admin api) With Trust store and Password
[英]how to specify trust store and trust store password in jTDS connection url?
我正在编写一个Java应用程序,它使用jTDS通过ssl连接连接到数据库。 我已将属性ssl = require添加到连接URL以启用ssl连接。
但是我找不到如何配置属性的地方,可以在其中指定要使用的信任库及其密码是什么? 此处列出了所有jTDS连接属性: http ://jtds.sourceforge.net/faq.html
SQL Server jdbc驱动程序具有以下类型的属性trustStore和trustStorePassword,通过以下链接: http : //technet.microsoft.com/zh-cn/library/bb879949.aspx
任何想法如何使用具有这些属性的jTDS配置ssl连接?
您可以通过Java application
动态指定trustStore
和keyStore
位置及其密码,如下所示:
System.setProperty("javax.net.ssl.trustStore", trustStore file path goes here);
System.setProperty("javax.net.ssl.trustStorePassword", password goes here);
System.setProperty("javax.net.ssl.keyStore", keyStore file path goes here);
System.setProperty("javax.net.ssl.keyStorePassword", password goes here);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.