1.注册华为云账号获取个人中心-》管理我的凭证-》访问密钥-》下载ak,sk密钥。
2.本地项目maven需要配置华为云私服
<profile>
<id>nexusProfile</id>
<repositories>
<repository>
<id>cse1</id>
<url>http://maven.huaweicse.com/nexus/content/groups/public/</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexusProfile</activeProfile>
</activeProfiles>
3.父工程和子工程的Pom文件jar包处理
<dependencies>
<!-- 取消cloud的配置,引用ces配置 -->
<!--<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Dalston.SR5</version>
<type>pom</type>
<scope>import</scope>
</dependency>-->
<dependency>
<groupId>com.huawei.paas.cse</groupId>
<artifactId>cse-dependency</artifactId>
<version>${cse.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
子工程:
<dependency>
<groupId>com.huawei.paas.cse</groupId>
<artifactId>cse-solution-service-engine</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.servicecomb</groupId>
<artifactId>spring-boot-starter-provider</artifactId>
</dependency>
4.microservice.yaml配置文件处理
5.注解及代码注意事项
1.因为serviceComb已经提供swagger的,所以本地代码无需配置
2.注释restController 和 controller上必须显示声明requestmapping
3.如果是Get查询请求,需要请求参数使用基本类型对象
4.启动类无需使用本地fegin和加上serviceComb启动注解