You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Mark Struberg (Jira)" <ji...@apache.org> on 2021/12/08 21:30:00 UTC
[jira] [Created] (DELTASPIKE-1445) Dynamic Config injection via a Supplier
Mark Struberg created DELTASPIKE-1445:
-----------------------------------------
Summary: Dynamic Config injection via a Supplier<T>
Key: DELTASPIKE-1445
URL: https://issues.apache.org/jira/browse/DELTASPIKE-1445
Project: DeltaSpike
Issue Type: New Feature
Security Level: public (Regular issues)
Components: Configuration
Affects Versions: 1.9.5
Reporter: Mark Struberg
Assignee: Mark Struberg
Fix For: 1.9.6
We should support injecting Configuration via {{Supplier<T>}}.
That way we can {{get()}} to access the current value.
The code to use the feature might look like:
{code}
@Inject
@ConfigProperty(name = "address.header.line", cacheFor = 10, cacheUnit = TimeUnit.MINUTES)
private Supplier<String> addressHeaderLine;
{code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)