當前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
SpringCloud项目接入华为云Paas平台CES一些注意事项
生活随笔
收集整理的這篇文章主要介紹了
SpringCloud项目接入华为云Paas平台CES一些注意事项
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
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啟動注解
總結
以上是生活随笔為你收集整理的SpringCloud项目接入华为云Paas平台CES一些注意事项的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java概念,Java基础概念
- 下一篇: Ambari安装client报错OSEr