Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Roberto Cortez
    @radcortez
    unfortunately for a single annotation you do required to have the CDI API jar in your CP
    Duncan
    @dabloem
    But because it was not that hard, I was just wondering if this already exists, and probably a bit more mature
    Roberto Cortez
    @radcortez
    not that I’m aware, because no one ever asked for it. usually spring developers stick to what they already have
    but that is interesting work, are you interested in contributing something into SR? :)
    Duncan
    @dabloem
    @radcortez yes, actually (in our company) we would like to advocate the use of @Inject and @Named (instead of @Autowired and @Component)
    so, the applications are not tightly coupled to any specific framework
    therefore our search to make @ConfigProperty Spring ' compatible'
    Roberto Cortez
    @radcortez
    thats great, probably a MP Config intregration may requires some additional pieces
    Duncan
    @dabloem
    of course I am willing to contribute
    Roberto Cortez
    @radcortez
    Duncan
    @dabloem
    exactly
    Roberto Cortez
    @radcortez
    a lot of that are actually validations before doing the injection
    Emily Jiang
    @Emily-Jiang
    Spring already supports @Inject etc. It will be good to get MP Config APIs work on spring boot apps
    Duncan
    @dabloem
    okay, I will make our sources public, see if there are any additional validations to add.
    Roberto Cortez
    @radcortez
    I’m happy to host an integration project in SR Config. Actually I have a PR for some time to split the CDI integration in its own module, so it would be easier for consumers to just use the runtime
    Duncan
    @dabloem
    and hopefully more experienced Spring devs can give feedback and suggestions
    (actually the @Inject is not required (currently), just like Quarkus, @ConfigProperty is sufficient
    Emily Jiang
    @Emily-Jiang
    Since it can work with either smallrye or Geronimo, I think it will be great integration module independent to the implementations so that people can consume this and bring in the chosen impl
    Duncan
    @dabloem
    @radcortez @Emily-Jiang this is the initial draft: https://github.com/abnamrocoesd/microprofile-config-spring
    Emily Jiang
    @Emily-Jiang
    @dabloem thanks, I will clone it and try it out later
    Duncan
    @dabloem
    The current issue is how to handle defaultValue, because I think I cannot reuse converters from the used implementations via (mp-config) api' s
    Roberto Cortez
    @radcortez
    there is a new API in Config 2.0 that allows you to retrieve the Converter
    bingo
    @finesoft
    Why is the default implementation of ConfigSource.getPropertyNames removed in 2.0? It seems that this will cause compatibility issues. For example, some ConfigSources in the'Resteasy' project do not implement this method, and errors will occur at startup.
    6 replies
    Emily Jiang
    @Emily-Jiang
    @finesoft please read eclipse/microprofile-config#431 for the getPropertyNames change.
    Tomas Langer
    @tomas-langer
    Hi, I am implementing config 2.0, and I have trouble with test EmptyValuesTestProgrammaticLookup - cannot find appropriate part in the specification that defines these rules. Can somebody please point me to the right place? For example ,bar should resolve into a single element bar, where we resolved it to and empty string and bar in previous version (and that seems logical to me, as the comma clearly states that there is an additional element). Also how would I define an empty string in a list in config?
    11 replies
    Tomas Langer
    @tomas-langer
    Another question - why is the ConfigProperties supporting private fields? That requires every implementation to handle reflection with illegal access. This will cause trouble with any newer version of Java, it is an implicit security risk and it is hard to implement.
    20 replies
    Tomas Langer
    @tomas-langer
    Configuration profile - how should I solve the "catch 22" thing - the spec says I should use the config sources as usual (based on ordinal) to obtain the profile to be used. And the next section defines file based configuration sources with different file names. Do I need to construct the configuration twice (eg. load all sources as configured in builder, determine profile, then load the sources again adding profile specific sources)? Or when loading sources, should I use only env vars and system properties to determine the profile? What if env vars & system properties are not used (e.g. user explicitly defined to only used discovered sources)?
    17 replies
    Tomas Langer
    @tomas-langer
    Related to empty values mentioned above - how am I supposed to configure a password that is an empty string? We have tests that use a database user with an empty password. Config changes it to null (as if it was not configured according to 2.0 spec). Now my tests fails on NPE, because the spec treats empty value the same as no value at all. And as far as I could find, there is no way to define this AT ALL.