String url = "jdbc:postgresql://x.x.x.x:5432/your_database_name?" +
"user=your_username&password=your_password&ssl=true&" +
"sslmode=prefer&" +
"sslrootcert=/path/to/your/root/ca.crt&" +
"sslcert=/path/to/your/client/cert.crt&" +
"sslkey=/path/to/your/client/key.pk8";
客户端的ssl配置级别只支持中间3种,推荐prefer
https://www.modb.pro/db/73422