Код: Выделить всё
test1.name=test1
test1.url=www.test.com
test2.name=test2
test2.url=www.test2.com
Код: Выделить всё
interface Generic {
String name();
String url();
}
@ConfigMapping(prefix = "test1")
interface Test1 extends Generic {}
@ConfigMapping(prefix = "test2")
interface Test2 extends Generic {}
Код: Выделить всё
@Dependent
class Configuration {
@Produces
@Name("test1")
Generic test1(@ConfigMapping(prefix="test1") Generic test1) {
return test1;
}
@Produces
@Name("test2")
Generic test2(@ConfigMapping(prefix="test2") Generic test2) {
return test2;
}
}
Заранее спасибо!
Подробнее здесь: https://stackoverflow.com/questions/792 ... e-same-jav
Мобильная версия