[英]Spring Boot Connecting database using SSL Certificate
I need to connect to postgresql using SSL Certificate from spring boot application.我需要使用来自 spring 引导应用程序的 SSL 证书连接到 postgresql。 I have got the certificate and currently i am connecting to db using username and password which i have provided in application.yml file.
我已经获得了证书,目前我正在使用我在 application.yml 文件中提供的用户名和密码连接到 db。
Can someone point me to the right tutorial?有人可以指出我正确的教程吗? I could not find anything relevant for spring boot ssl database connection.
我找不到与 spring 启动 ssl 数据库连接相关的任何内容。
you need to append below in URL你需要在 URL 下面的 append
&sslmode=verify-full&sslrootcert=/path/to/pemfile
Your URL will look something like你的 URL 看起来像
jdbc:postgresql://server:5432/databaseName?currentSchema=dbschema
&sslmode=verify-full&sslrootcert=/home/certificates/mycert.pem
you can refer below URLs您可以参考以下网址
https://jdbc.postgresql.org/documentation/head/connect.html#ssl https://jdbc.postgresql.org/documentation/head/connect.html#ssl
https://docs.amazonaws.cn/en_us/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL https://docs.amazonaws.cn/en_us/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.