New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty value for spring.datasource.password can cause NullPointerException #26633
Comments
@chrischall I wasn't able to reproduce the issue with a quick test on my end. Can you provide a small sample application that we can run to reproduce the issue? |
Apologies. I neglected to include the spring:
datasource:
username: ${user.name}
password:
driver-class-name: org.postgresql.Driver
type: org.apache.tomcat.jdbc.pool.DataSource
url: jdbc:postgresql://localhost/database |
Thanks for the followup @chrischall. This is a regression in Previously, we used the binder to bind a map of properties, where In 2.5.x, we use a |
THx Thx Thx Thx! |
After upgrading to Spring Boot 2.5.0, my application will no longer start locally when my local database user has no password.
I am able to get it to start if I set a password for the user and update my config accordingly.
Given the following properties:
A
NullPointerException
is raised:This results in:
After poking around a bit, I noticed this method in
DataSourceProperties
:The text was updated successfully, but these errors were encountered: