Spring DI - Autowired property is null in a REST service

前端 未结 4 1227
攒了一身酷
攒了一身酷 2020-11-27 17:49

I\'m getting started with Spring DI, but I\'m struggling with dependency injection and the worse part is that I\'m not even sure why as it seems ok to me. Hopefully you guys

4条回答
  •  无人及你
    2020-11-27 18:47

    or you can simply extend SpringBeanAutoWiringSupport class. Like this: public class DemoRestService extends SpringBeanAutoWiringSupport. By extending this support class, properties of your service class can be auto-wired.

提交回复
热议问题