mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Add "Autowired" alias for "Autowire" UDA to satisfy Spring habits
This commit is contained in:
parent
b0c880a950
commit
92db3c0405
|
@ -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 )))) {
|
||||
|
|
|
@ -43,7 +43,7 @@ version(unittest) {
|
|||
}
|
||||
|
||||
class ComponentF {
|
||||
@Autowire
|
||||
@Autowired
|
||||
public ComponentA componentA;
|
||||
|
||||
mixin AutowireConstructor;
|
||||
|
|
Loading…
Reference in a new issue