如何创建一个使用 TLS 连接到 sql server 的 jdbctemplate?

问题描述 投票:0回答:0

我在 application.properties 中使用如下属性使其工作,

spring.datasource.url=jdbc:sqlserver://sql0001.us.com;databaseName=grade;encrypt=true;trustServerCertificate=false;trustStore=c://git//t.jks;trustStorePassword=*****

并创建了一个 jdbctemplate bean。但是,密码不应出现在属性文件中。我需要在命令行中为其提供一个单独的属性。有没有像这样的财产

spring.datasource.url.trustStorePassword
?

sql-server spring-boot jdbctemplate
© www.soinside.com 2019 - 2024. All rights reserved.