Add "Autowired" alias for "Autowire" UDA to satisfy Spring habits

This commit is contained in:
Mike Bierlee 2014-10-12 17:41:09 +02:00
parent b0c880a950
commit 92db3c0405
2 changed files with 3 additions and 1 deletions

View file

@ -18,6 +18,8 @@ debug {
class Autowire{};
alias Autowired = Autowire;
public void autowire(Type)(Container container, Type instance) {
foreach (member ; __traits(allMembers, Type)) {
static if(__traits(compiles, __traits( getMember, Type, member )) && __traits(compiles, __traits(getAttributes, __traits(getMember, Type, member )))) {

View file

@ -43,7 +43,7 @@ version(unittest) {
}
class ComponentF {
@Autowire
@Autowired
public ComponentA componentA;
mixin AutowireConstructor;