1
有一个在谷歌吉斯一种方便的方法,它允许在一个呼叫属性的绑定:什么是Guice的Names.bindProperties(Binder,属性)等效的CDI(焊接)?
Names.bindProperties(binder(), myProperties);
然后将它们注射用注释:
@Inject
@Named("my.properties.server.url")
private String serverUrl;
是否有CDI等效的方法(通过焊接实现)还是更好的东西?