You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@deltaspike.apache.org by Andrew Marinchuk <ra...@yandex.ru> on 2017/06/08 09:26:23 UTC

parametrized @Configuration

Hi!

Currently, the methods from interfaces annotied with @Configuration ignore parameters. Is it possible (in future) to add support to use templated parameters passed via method parameters in @ConfigProperty's name parameter?

i.e.
@Configuration(prefix="app.mygroup.", cacheFor=60)
public interface MyConfig {
//........

  @ConfigProperty(name="mapparam.$1")
  public String getMapParam(String key);

  @ConfigProperty(name="someparam.$1.$2")
  public int getSomeParam(String param1, String param2);

//........
}

Best regards,
Andrew Marinchuk