startjava opened a new issue #8803:
URL: https://github.com/apache/dubbo/issues/8803


   ```
   dubbo:
     scan:
       base-packages: com.ghy.www.my.direct.provider.service # 扫包
   ```
   和
   ```
   package com.ghy.www.my.direct.provider.javaconfig;
   
   import com.ghy.www.my.direct.provider.service.HelloService1;
   import com.ghy.www.my.direct.provider.service.HelloService2;
   import org.apache.dubbo.config.annotation.DubboService;
   import org.springframework.context.annotation.Bean;
   import org.springframework.context.annotation.Configuration;
   
   @Configuration
   public class JavaConfigDubbo {
       @Bean
       @DubboService
       public HelloService1 getHelloService1() {
           return new HelloService1();
       }
   
       @Bean
       @DubboService
       public HelloService2 getHelloService2() {
           return new HelloService2();
       }
   }
   ```
   
   中的
   `@DubboService`
   
   有什么关联呢?既然已经使用@DubboService声明服务了,为什么还要扫包呢?感谢!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to