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 2021/09/15 00:46:23 UTC

[GitHub] [dubbo] startjava opened a new issue #8803: 有没有熟悉dubbo.scan.base-packages和@DubboService源代码的大佬?

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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo] BurningCN commented on issue #8803: 有没有熟悉dubbo.scan.base-packages和@DubboService源代码的大佬?

Posted by GitBox <gi...@apache.org>.
BurningCN commented on issue #8803:
URL: https://github.com/apache/dubbo/issues/8803#issuecomment-919827869


   @DubboService只是一个标记,配置扫描包是会识别包里面带有该注解的标记,然后做一些处理。再比如说你有多个包,每个包里面含有各自想要暴露的服务(含有@DubboService注解),但是某个时刻我只想暴露其中一个包下的服务,就可以配置对应的包扫描规则。
   
   这点就和spring的@Component和@ComponentScan一样


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo] startjava closed issue #8803: 有没有熟悉dubbo.scan.base-packages和@DubboService源代码的大佬?

Posted by GitBox <gi...@apache.org>.
startjava closed issue #8803:
URL: https://github.com/apache/dubbo/issues/8803


   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo] startjava commented on issue #8803: 有没有熟悉dubbo.scan.base-packages和@DubboService源代码的大佬?

Posted by GitBox <gi...@apache.org>.
startjava commented on issue #8803:
URL: https://github.com/apache/dubbo/issues/8803#issuecomment-919872716


   感谢华哥
   
   
   
   发自我的iPhone
   
   
   ------------------ 原始邮件 ------------------
   发件人: 灼华 ***@***.***&gt;
   发送时间: 2021年9月15日 16:52
   收件人: apache/dubbo ***@***.***&gt;
   抄送: startjava ***@***.***&gt;, Author ***@***.***&gt;
   主题: 回复:[apache/dubbo] ***@***.***源代码的大佬? (#8803)
   
   
   
   
   
    
   @***@***.***注解),但是某个时刻我只想暴露其中一个包下的服务,就可以配置对应的包扫描规则。
    
   ***@***.******@***.***一样
    
   —
   You are receiving this because you authored the thread.
   Reply to this email directly, view it on GitHub, or unsubscribe.
   Triage notifications on the go with GitHub Mobile for iOS or Android.


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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