Great , you are right ! Dubbo follows a similar ServiceLoader mechanism,  By 
default, the SPI implementation is looked up in the following order: 
META-INF/dubbo/internal/
META-INF/dubbo/
META-INF/services/

Here is  SPI com.alibaba.dubbo.container.Container file content:
spring=com.alibaba.dubbo.container.spring.SpringContainer

You need to specify a name and corresponding implementation class name on each 
line.

yiji


> 在 2018年4月8日,23:24,John D. Ament <johndam...@apache.org> 写道:
> 
> Oh ok, so if I wanted a different one, do I just implement the interface,
> or are there other requirements?  Many other frameworks leverage a
> META-INF/services ServiceLoader pattern.
> 
> John
> 
> On Sun, Apr 8, 2018 at 11:22 AM shang zonghai <yiji.git...@hotmail.com>
> wrote:
> 
>> The meaning of the SPI default use springContainer, allow custom
>> extensions.
>> 
>> yiji
>> 
>>> 在 2018年4月8日,23:18,John D. Ament <johndam...@apache.org> 写道:
>>> 
>>> Weird, because even that says spring
>>> 
>> https://github.com/apache/incubator-dubbo/blob/master/dubbo-container/dubbo-container-api/src/main/java/com/alibaba/dubbo/container/Container.java#L24
>>> 
>>> But it's a step, let me play around with it a bit.
>>> 
>>> John
>>> 
>>> On Sun, Apr 8, 2018 at 10:36 AM shang zonghai <yiji.git...@hotmail.com>
>>> wrote:
>>> 
>>>> 
>>>> SPI: com.alibaba.dubbo.container.Container
>>>> 
>>>> Default SpringContainer extends this API,The dubbo-config-spring module
>>>> supports spring-related functions.
>>>> Dubbo design goals are highly scalable, allowing custom extensions to
>>>> support more DI containers.
>>>> 
>>>> Kind regards,
>>>> yiji
>>>> 
>>>> 
>>>>> 在 2018年4月8日,22:27,John D. Ament <johndam...@apache.org> 写道:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> Looking at dubbo, its very interesting.  I was wondering though, is
>>>> Spring
>>>>> optional in Dubbo, or is it a required part to make Dubbo work?  Is
>> there
>>>>> any SPI that could be used in Dubbo that would allow other DI
>> containers
>>>> to
>>>>> be used?
>>>>> 
>>>>> John
>>>> 
>>>> 
>> 
>> 

Reply via email to