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 @DefaultValue cannot be used on collections, maps, arrays or optional values #32559
Comments
and a test:
This is for thank you for looking into it. |
Thanks, I misread our current code and thought that it dealt with collection types, but it doesn't. I think we should change that and allow |
That was fast! Thank you. |
would you happen to know when this one will reach spring-boot-3? just want to put a note for myself to slightly change some code when that happens, so that I do not forget; nothing more. thank you |
thank you. |
I have this simple configuration:
This fails with :
Parameter of type java.util.Set<java.lang.String> must have a non-empty default value.
What I would like to get as a default value is an empty Set. Of course as a workaround, I can:
but considering there are any of these default collections/maps, I do not want to add an accessor for each of the properties. Is there are a way to make
@DefaultValue
"return" an empty Set? thank you.The text was updated successfully, but these errors were encountered: