spiral

Build Status License Maven central Sonatype Nexus (Snapshots)

The Spiral project make it easier to test dubbo service. When multiple dubbo services are modified, developer can use feature that Sprial provides to invoke specified service providers instead of Explicit target which is inconvenient.

This project should only be used in alibaba dubbo 2.2 - 2.6. If you use apache dubbo 2.7+, you can try Tag routing rules.

Quick start

The most common way to use Dubbo is to run it in Spring Framework, Spiral only supports Spring Framework.

dependency

Add the following in your maven pom file:

    <dependencies>
        <!-- other dependencies -->

        <dependency>
            <groupId>io.github.shallowinggg</groupId>
            <artifactId>spiral</artifactId>
            <version>0.1.0</version>
        </dependency>
    </dependencies>

config

Add @EnableSpiral annotation on any Configuration annotated class:

import io.github.shallowinggg.spiral.spring.EnableSpiral;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableSpiral
public class XXXConfig {
    
    // other configs
}

The dubbo service providers and consumers which need to test are all should add this annotation.

启动

Add following system property when started:

-Dspiral.enable=on -Dspiral.tag=red

If multiple people are testing at the same time, you should set different tags.