How to configure SSL mongodb connection in yml file spring boot?
You can try a configuration like the one below;

server:
    ssl:
        key-store: classpath:keystore.jks
        key-store-password: secret
        key-password: another-secret
data:
     mongodb:
        authentication-database: admin
        database: &lt;database&gt;
        host: &lt;host&gt;
        password: &lt;password&gt;
        port: &lt;port&gt;
        username: &lt;username&gt;
        ssl-enabled: true