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
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
<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();
}
}