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
Non-public property in Saml2RelyingPartyProperties' Registration class #19194
Comments
I opened this PR if needed: #19195 |
As noted on #19195, |
Hi, just a comment regarding use cases for using the internal config properties classes. I too have stumbled yesterday into this visibility issue. I have a use case where the powers decreed that all config must be in TypeSafe format (sadly) not yml/properties. So I have an EnvironmentPostProcessor to add the property sources for the TypeSafe config in the correct order. So far so good. My issue comes when I try to let Boot Auto config properties. Simple primitive bindings work ok. However, trying to bind an object (like a list of registrations) doesn't work (I end up with a list of a map and later a class cast exception). I therefore need to transform the properties to the config class in my bean config class either overriding or using The idea for doing it like this comes directly from the Boot documentation (2 data source set up) where we do need to use the internal config prop classes... ? |
@woodforda Thanks for the additional use case. That sounds like something isn’t quite right in your environment post-processor. If you map the keys in the same way as Boot does for YAML or properties files, the binding should work without the need for any further transformation. I’d recommend comparing the contents of the property sources when you have equivalent TypeSafe or YAML/properties configuration to help to diagnose the problem. I’ve opened #19199 to straighten out the contradiction in the documentation. Thanks for pointing it out. |
@wilkinsona You're welcome. Yep I understand the issue - just trying to ignore the the inevitable - Spring would happily convert all for me but this happens (I assume) as you populate the property source - the TypeSafe puts, by default, a Map in. So I would have to write a converter in the TypeSafe world to do it and put the result in the property source. But would like to avoid coding something that Spring would do out of the box. I suspect I have not many choices. However, not quite the topic of this ticket :) but thanks! |
That doesn't mean this API is meant to be called directly, as documented in the reference documentation (updated). |
I was trying to use the properties set in the YAML file through the
Registration
class insideSaml2RelyingPartyProperties
class.The problem is that the method has only package visibility and is not public.
P.S. I'm not sure if there is a reason to not make this public.
The text was updated successfully, but these errors were encountered: