Got you. It's frequently frustrated me that the config admin metatype
default value can't be used to provide values in the absence of a
configuration. I've just used constants to provide default property values
that can be shared between components.

On Sun, 9 Feb 2025 at 16:37, Steinar Bang <s...@dod.no> wrote:

> >>>>> Paul McCulloch <pkmccull...@gmail.com>:
>
> > To create a configuration use the web or ssh console, or create the file
> > no.priv.bang.authservice.config.cfg in /etc.
>
> Yes, I know.
>
> But what I tried to achieve (if possible) was to have one component
> create and populate the file with defaults set in code if not present,
> and use the configured values in the file if present, and then have a
> different component use that same configuration.
>
> If possible... and it looks like it wasn't possible (or at least: not
> possible without a lot of code).
>
> Anyway, both components are connected to the same database using
> DataSource injections and I do the shared value setting in the database
> (it was simpler for component #2, I could just add the config value to
> the existing select to retrieve the config value from the database).
>
> (I'll post links to the code in question to this thread after it is
> pushed. Can't be pushed yet because I have a dependency I have to
> release to maven central first... or... it can be pushed but the CI will
> break)
>
>

Reply via email to