You can migrate applications developed with Dubbo to High-speed Service Framework (HSF) by adding Maven dependencies or adding or modifying the Maven packaging plug-in and modifying the configurations. However, we recommend that beginners do not use this method because Enterprise Distributed Application Service (EDAS) already supports applications in the native Dubbo framework.

Background information

For more information about how to develop applications in the native Dubbo framework, see Use Spring Boot to develop Dubbo microservice-oriented applications.
Note This topic describes how to modify the configuration. The application development process is not described in detail in this topic. For more information about how to develop applications, download these Demos for converting Dubbo applications to HSF applications.

Add Maven dependencies

In the project configuration file pom.xml, add the spring-cloud-starter-pandora dependency.

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-pandora</artifactId>
    <version>1.3</version>
</dependency>

Add or modify the Maven packaging plug-in

In the pom.xml file, add or modify the Maven packaging plug-in.
Note To prevent conflicts with other packaging plug-ins, do not add configurations of any other FatJar plug-ins to the plugin field in build.
<build>
    <plugins>
        <plugin>
            <groupId>com.taobao.pandora</groupId>
            <artifactId>pandora-boot-maven-plugin</artifactId>
            <version>2.1.9.1</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Modify the configuration

In the Spring Boot startup class, add the following two lines for loading Pandora:

import com.taobao.pandora.boot.PandoraBootstrap;
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;

    @SpringBootApplication
    public class ServerApplication {

        public static void main(String[] args) {
            PandoraBootstrap.run(args);
            SpringApplication.run(ServerApplication.class, args);
            PandoraBootstrap.markStartupAndWait();
        }
    }