@Olivier: let me rephrase it: you dont find URLs you find PropertySources. "find a property source able to handle an URL" doesnt make any sense (I get your use case but your code is not designed correctly, just change it to handle 1 format and you are done)
Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2015-02-13 9:18 GMT+01:00 Oliver B. Fischer <[email protected]>: > My problem is only that I am asking for a way to find a PropertySource able > to handle a given URL. And if a PropertySource is able handle the URL it > must be also able to parse. At least my PropertyProvider are able to do it. > But for the ConfigurationBuilder I need a generic ways to find a > PropertySource able to handle a URL. Ok, I can hardcode it but I think this > is not what I wan't. > > For now I will add an extension providing a SPI interface. We will see how > it works out. > > Oliver > > Am 13.02.15 um 08:13 schrieb Romain Manni-Bucau: >> >> The point is API is not done to have auto reading of resources cause it >> makes no sense in most of cases: xml, json, yaml, txt...all these formats >> need more than knowing the extension to be able to read it. It means >> PropertySource has to link path and format which is the role of the >> provider you have to write. >> >> Said otherwise each kind of file type you ll discover will need its >> provider otherwise if you do what you described you ll just manage to not >> get the expected conf (in the best case) >> Le 13 févr. 2015 00:09, "Oliver B. Fischer" <[email protected]> a >> écrit : >> >>> It helps me to locate resources, right? But if I understand it correctly >>> it helps me to get a bunch of URLs. So I am at the same point as before. >>> >>> Bye, >>> >>> Oliver >>> >>> >>> >>> Am 12.02.15 um 20:51 schrieb Anatole Tresch: >>> >>> -- >>> N Oliver B. Fischer >>> A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany >>> P +49 30 44793251 >>> M +49 178 7903538 >>> E [email protected] >>> S oliver.b.fischer >>> J [email protected] >>> X http://xing.to/obf >>> >>> > > -- > N Oliver B. Fischer > A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany > P +49 30 44793251 > M +49 178 7903538 > E [email protected] > S oliver.b.fischer > J [email protected] > X http://xing.to/obf >
