|
|
|
|
|
by kevinmhickey
2227 days ago
|
|
With the caveat that I have not read your code, I usually solve this same problem by adding a parameter constructor to FooController and annotating it @Autowired. Spring will then inject using the constructor instead of setters or reflection, and your unit tests can construct the object using mocks, stubs, nulls or full object instances. |
|