java - How do you make @Resource optional? -
is there way make @resource optional? means if don't have bean of type requested @resource, won't exception, set null.
ok looks isn't possible. had use @autowired(required = false). not wanted, do.
is there way make @resource optional? means if don't have bean of type requested @resource, won't exception, set null.
ok looks isn't possible. had use @autowired(required = false). not wanted, do.
Comments
Post a Comment