title: Springboot ssl truststore properties not working
body: <p>I am running a spring boot application which is a webservice client and sends requests to a webservice on a Jboss.</p>
  
  <p>A certificate was added on the jboss and since then i started having exception:</p>
  
  <pre><code>Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
          at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
  </code></pre>
  
  <p>So i searched on google on how to communicate with a cert based Jboss and came up with the idea that I needed to create a trust store from the jboss cert and then use that in my application.yaml</p>
  
  <pre><code>    server:
        port: 7887
        address: 127.0.0.1
        ssl:
    #      enabled: true
          trust-store: file:config/myapp.truststore
          trust-store-password: myappdomain
  </code></pre>
  
  <p>These didnt work. So i went with more manual and on the grounds approach</p>
  
  <p>I just did the below and this worked. ( for any one having the same issue this works;I added the truststore in the config directory and the config directory was at the same level as the myapp.jar) </p>
  
  <pre><code>java  -Djavax.net.ssl.trustStore=config/myapp.truststore -jar myapp.jar  
  </code></pre>
  
  <p>My question: why did the application.yaml configs didnt work. was i missing something. </p>
  
  <p>the above approach works without a password ( may be because the password is the same on keystore and cert in jboss as the trust store password). </p>
  
  <p>Is there any security issue or any kind of issue with the approach that worked. and for future how can i make the yaml configs work. </p>