Open ibmmqmet opened 4 days ago
Thanks for the report. It may be due to https://github.com/spring-projects/spring-boot/issues/42835, but I cannot be certain as the problem does not reproduce if I try to recreate what you've described above. Most likely because nothing's using the SSL bundle that you've configured.
By specifying only key.jks
as the location, it's ambiguous how that resource should be loaded. An attempt is being made to load it using the classpath and this failed. That makes sense as, judging by what you have described, key.jks
will not be on the classpath. You could try file:key.jks
instead to make it clear that you want to load the store from the file system.
If the above does not help and/or you'd like us to spend some time investigating further, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.
Adding file:
does get it to work. I don't remember seeing that syntax in the original docs, and I based it on finding other examples of using raw filenames for keystores in Spring Boot projects. But perhaps I missed this being different.
Thanks for the quick response.
Thanks for confirming that it works with the file:
prefix. I'm going to re-open this as I'd like us to look at whether we can restore the old behavior in this area and also keep the benefits of the recent changes around resource loading.
I ran into a similar issue, but with a different error message:
***************************
APPLICATION FAILED TO START
***************************
Description:
The content of 'keystore.location' from bundle 'myBundle' is not watchable'. Only 'file:' resources are watchable, but '/usr/temp/certs/my-dev-keystore-pkcs12.p12' has been set
Action:
Update your application to correct the invalid configuration:
Either use a watchable resource, or disable bundle reloading by setting reload-on-update = false on the bundle.
spring.ssl.bundle.jks:
myBundle:
reload-on-updates: true
keystore:
location: /usr/temp/certs/my-dev-keystore-pkcs12.p12
password: superSecretPassword
type: "PKCS12"
Adding file:
in front of my location worked as well.
I am getting an exception with the SslBundles not being able to load the keystore. This worked fine with Spring Boot 3.3.6 (and previous levels). The file
key.jks
is in my current directory, from where the app is being run viagradle bootRun
.Configuration:
Exception stack:
with the root of the exception stack being