Coder Social home page Coder Social logo

provider registration :It need attribute“scan: base-packages: ”label but do not need value.Because it always scan the package and its children-packages where start-up class in, no matter what value you attribute about dubbo HOT 2 CLOSED

xiaoyibuchitang avatar xiaoyibuchitang commented on September 23, 2024
provider registration :It need attribute“scan: base-packages: ”label but do not need value.Because it always scan the package and its children-packages where start-up class in, no matter what value you attribute

from dubbo.

Comments (2)

liufeiyu1002 avatar liufeiyu1002 commented on September 23, 2024

Whether the @DubboService annotation takes effect depends on whether the ServiceAnnotationPostProcessor exists

ServiceAnnotationPostProcessor has 2 functions

  1. Scan all classes under the given path to find classes with DubboService related annotation types. Create BeanDefinition and register it in the spring container (ServiceBean instance)
  2. Traverse all BeanDefinition objects in the container, process the DubboService related annotation on the @Bean method, create a BeanDefinition and register it in the spring container (ServiceBean instance)

In the springboot dubbo project, there are two conditions for whether ServiceAnnotationPostProcessor is created (either one can be met). If it exists at the same time, multiple ServiceAnnotationPostProcessor instances will be created.

  1. Using the @EnableDubbo annotation will create a ServiceAnnotationPostProcessor instance. The corresponding scanpackage path is the scanBasePackages attribute. When the attribute scanBasePackages is not set, the package path of the startup class is used by default.
  2. Configuring dubbo.scan.base-packages (regardless of whether it has a value) will create a ServiceAnnotationPostProcessor instance

from dubbo.

AlbumenJ avatar AlbumenJ commented on September 23, 2024

No news is good news. Please feel free to create a new issue if you have any question.

from dubbo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.