You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/11/21 08:50:03 UTC

[GitHub] TuringHero opened a new issue #306: @Reference 引用的服务注入为空

TuringHero opened a new issue #306: @Reference 引用的服务注入为空
URL: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/306
 
 
   ### application.ymal
   ```ymal
   dubbo:
     registries:
       - id: master
         address: zookeeper://127.0.0.1:2181
         isDefault: true
       - id: user-center-zk
         address: zookeeper://10.173.153.112:2181
     application:
       id: insurance-web
       name: insurance-web
   server:
     port: 8085
   ```
   ### Component
   ```java
       @Reference(registry = Constant.USER_CENTER_ZK_ID)
       private RegistService registService;
   ```
   ### 启动类,注解试了DubboComponentScan、EnableDubboConfig,都不行,把包名写上也不行
   ```java
   @EnableDubbo
   @SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
   public class WebApplication {
   
       public static void main(String[] args) {
           new SpringApplicationBuilder(WebApplication.class)
                   .run(args);
       }
   
   }
   ```
   SpringBoot 版本2.1.0.RELEASE、Java11、dubbo-spring-boot-starter版本0.2.0
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org