Is there any way to inject “null” value on properties which references undefined beans?
Is there any way to inject null value on properties which references undefined beans?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
nullunless it is in testing. You can always have two sets of beans: implementation and stubs where the stubs are not full implementations.