After springboot introduces dubbo, the null problem is solved when using Reference to inject service references in the controller

1 Add dubbo annotation scan in consumer.xml

<dubbo:annotation package="com.test.controller" />

2 Add in the dependency file:

<dependency>
  <groupId>com.alibaba.spring</groupId>
  <artifactId>spring-context-support</artifactId>
  <version>1.0.2</version>
</dependency>

Guess you like

Origin blog.csdn.net/lsb2002/article/details/87946225#comments_26629299