===
public static class A {
private final B b;
@Inject
public A(B b) {
this.b = b;
}
}
public static class B {
private A a;
@Inject
public void setA(A a) {
this.a = a;
}
}
public static void main(String[] args) {
Guice.createInjector(new AbstractModule() {
@Override
protected void configure() { }
}).getInstance(A.class);
}
===
guice reports error:
===
Tried proxying com.company.Temp$A to support a circular dependency, but it is
not an interface
===
Proxy is not needed here: guice should just create "B" first, inject it into
"A" constructor and then inject "A" into "B".
Original issue reported on code.google.com by stepan.k...@gmail.com on 7 Mar 2012 at 7:42
Original issue reported on code.google.com by
stepan.k...@gmail.com
on 7 Mar 2012 at 7:42