-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Register Base64ProtocolResolver as protocol resolver by default #41433
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Base64ProtocolResolver
as protocol resolver by default
I think we should do something similar to |
Flagging to see if the team thing we should consider this a bug or and enhancement. I'm leaning enhancement to be on the safe side. |
I think it should be an enhancement also. This should fix the problem noted here, where a configuration property class with a field of type |
Could you mention this in 3.4 release notes? |
In most of our projects these days, we use the following approach to be able to bind base64 encoded files as configuration properties of
org.springframework.core.io.Resource
type:Where
Base64ProtocolResolver
is basically line for line identical implementation to the one recently introduced in #36033.Upgrading to Spring Boot 3.3, expectation was we would be able to remove our homegrown
Base64ProtocolResolver
and boilerplate code from the application main class, but this is not possible because newly introducedBase64ProtocolResolver
isn't registered with application context as protocol resolver. Additionally, Spring Boot providedBase64ProtocolResolver
is (understandably) package private so it can't be reused.Would it be possible to register
Base64ProtocolResolver
as protocol resolver by default?The text was updated successfully, but these errors were encountered: