0

Is there any way to inject "null" value on properties which references undefined beans?

Samuel García
  • 2,199
  • 14
  • 21

1 Answers1

1

You give no details about how you are doing your injection but this article may be of help Inject null to autowired @Resource member in spring unit test. I would encourage you not to set beans to null unless it is in testing. You can always have two sets of beans: implementation and stubs where the stubs are not full implementations.

Community
  • 1
  • 1
mark-cs
  • 4,677
  • 24
  • 32