mdeinum / blog-autowiring-null

4 stars 0 forks source link

[question] why injected objects are not null in a private method invoked via this.xxx? #1

Open ldwnt opened 2 years ago

ldwnt commented 2 years ago

According to your blog: https://deinum.biz/2020-07-03-Autowired-Field-Null/, in a private method xxx invoked via self reference say self.xxx, the injected objects are null because the private function xxx can not be proxied thus is invoked directly on the original object. If the xxx is invoked via this.xxx, it can not be invoked on the proxy object, either. But why the injected objects are not null in this case?

mdeinum commented 2 years ago

I don't see where I state that as I don't mention self injection in that blog. Can you provide a sample as with what you mean as from your description it isn't totally clear.