Code Monkey home page Code Monkey logo

spring-cloud-huawei's Issues

add application name

ServiceComb has application name , spring cloud not have this.
It is for aggregation services

支持open api文档自动生成

可以要求开发者写注解,service center支持契约的管理,期望服务启动后能够自动注册契约到service center中

依赖管理错误

<dependency>
<groupId>com.huaweicloud</groupId>
<artifactId>spring-cloud-huawei-dependencies</artifactId>
<version>1.2.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
在当前这个版本中,指定了
<spring-cloud.version>2.1.2.RELEASE</spring-cloud.version>
<spring-boot.version>2.1.6.RELEASE</spring-boot.version>
为什么还要指定<spring.version>5.2.3.RELEASE</spring.version>,spring的版本本身对springmvc就是有版本依赖管理的现在这样指定版本是有冲突的spring-boot的版本过低导致spring的api不兼容,我们发布前不测吗?基本的应用启动都起不来。

there are missing depndency

there are missing depndencies like:

<dependency>
  <groupId>com.huawei.paas.dtm</groupId>
  <artifactId>dtm-client</artifactId>
</dependency>

更新Components

sch看上去已经有很多组件了,但是readme没有同步更新

swagger generator produces should not include text/plain

@RestController
@RequestMapping(path = "/", produces = MediaType.APPLICATION_JSON_VALUE)
public class UserEndpoint {
  @Autowired
  private UserService userService;

  @PostMapping(path = "/v1/user/login", produces = MediaType.APPLICATION_JSON_VALUE)
  @ResponseBody
  public SessionInfo login(@RequestParam(name = "userName") String userName,
      @RequestParam(name = "password") String password) {
    return userService.login(userName, password);
  }

got

paths:
  /v1/user/login:
    post:
      tags:
      - "UserEndpoint"
      summary: "login"
      operationId: "login"
      schemes: []
      consumes:
      - "text/plain"
      - "application/json"
      produces:
      - "text/plain"
      - "application/json"
      parameters:
      - name: "password"
        in: "query"
        description: "password"
        required: true
        type: "string"
      - name: "userName"
        in: "query"
        description: "userName"
        required: true
        type: "string"
      responses:
        200:
          description: "OK"
          examples: {}
          headers: {}
          schema:
            $ref: "#/definitions/SessionInfo"
        201:
          description: "Created"
          examples: {}
          headers: {}
        401:
          description: "Unauthorized"
          examples: {}
          headers: {}
        403:
          description: "Forbidden"
          examples: {}
          headers: {}
        404:
          description: "Not Found"
          examples: {}
          headers: {}
      security: []
      deprecated: false

This is not correct

About the irregular config keys

Hi. The configurations for feature switch are irregular in spring-cloud-huawei.
For example, the config item to enable the credentials is spring.cloud.servicecomb.credentials.enable, while the config item to enable the service registry is spring.cloud.servicecomb.discovery.enabled. Conventionally, such kind of config items are usually suffixed by enabled.
And I find that the config key spring.cloud.servicecomb.discovery.enabled are referred in different places in literal form. Maybe it's better to define a const for it.
Any ideas? : )

Compilation fails

version: master
env: macos10.13 + jdk 1.8


dtm-client:jar:1.0.2  not found  why config  travis and  can not work
[ERROR] Failed to execute goal on project spring-cloud-huawei-dtm: Could not resolve dependencies for project com.huaweicloud:spring-cloud-huawei-dtm:jar:1.2.0: Failure to find com.huawei.paas.dtm:dtm-client:jar:1.0.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :spring-cloud-huawei-dtm

serviceComb集成springcloudgateway无法使用微服务id进行路由导航

同样使用例子中的spring-cloud-starter-huawei-servicecomb-discovery进行服务注册

测试可以使用服务id进行路由导航

gateway使用spring-cloud-starter-huawei-servicecomb-discovery,

服务提供者

org.apache.servicecomb
spring-boot-starter-provider
1.1.0

进行注册, 可以使用uri的方式进行路由,但是使用微服务id的方式进行路由报如下错误
java.lang.IllegalStateException: Invalid host: lb://workspace_service
at org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter.filter(RouteToRequestUrlFilter.java:86) ~[spring-cloud-gateway-core-2.1.2.RELEASE.jar:2.1.2.RELEASE]
at org.springframework.cloud.gateway.handler.FilteringWebHandler$GatewayFilterAdapter.filter(FilteringWebHandler.java:138) ~[spring-cloud-gateway-core-2.1.2.RELEASE.jar:2.1.2.RELEASE]
at org.springframework.cloud.gateway.filter.OrderedGatewayFilter.filter(OrderedGatewayFilter.java:44) ~[spring-cloud-gateway-core-2.1.2.RELEASE.jar:2.1.2.RELEASE]
at org.springframework.cloud.gateway.handler.FilteringWebHandler$DefaultGatewayFilterChain.lambda$filter$0(FilteringWebHandler.java:118) ~[spring-cloud-gateway-core-2.1.2.RELEASE.jar:2.1.2.RELEASE]
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:44) [reactor-core-3.2.10.RELEASE.jar:3.2.10.RELEASE]
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) [reactor-core-3.2.10.RELEASE.jar:3.2.10.RELEASE]

<bug>A problem when discovery

if exist mutiple instances with different version , we can only get the latest version instance .
cause:
org.springframework.cloud.servicecomb.discovery.client.model.ServiceRegistryConfig#DEFAULT_CALL_VERSION
it's a fix value

huawei-config中properties的配置参数不统一还是就是如此设计

在properties中使用的是enable而在@ConditionalOnProperty中使用的是enabled,名称为什么不统一

@Component @ConfigurationProperties("spring.cloud.servicecomb.config") public class ServiceCombConfigProperties { private boolean enable = true;

@Configuration @ConditionalOnServiceCombEnabled @ConditionalOnProperty( name = {"spring.cloud.servicecomb.config.enabled"}, matchIfMissing = true ) public class ServiceCombConfigAutoConfiguration

@Configuration @ConditionalOnProperty( name = {"spring.cloud.servicecomb.config.enabled"}, matchIfMissing = true ) public class ServiceCombConfigBootstrapConfiguration

refactor all code package to com.huaweicloud

Currently is

org.springframework.cloud.huawei.config

and

org.springframework.cloud.dtm.consumer.feign

These are not very good. Change to the following

com.huaweicloud.config

and

com.huaweicloud.dtm

fix config bug for long path

Servicestage constraints docker file path to have xx words, and lastest version fixed this issue. The docker file and scripts with short path can be deleted.

modify package name

some package name in the unit test is
org.springcloudframework.cloud
we need to change it to
com.huaweicloud

微服务移步注册方式

com/huaweicloud/servicecomb/discovery/registry/ServiceCombServiceRegistry.java
这个java类中涉及到服务注册的环境,里头的loopRegister反复注册的方法采用了while(true)的方式,微服务启动过程如果没有配置注册中心地址或者没有启动注册中心的话,会一直在这里做循环,主函数main中的SpringApplication.run后面的执行语句如打印服务启动成功日志会因此无法执行。
是否可以考虑优化成异步注册的方式,异步处理重试注册的场景?

Support webflux

[dtm module] and [router modele] only support feign client and resttemplet client for now.
We need support spring webflux in the future.

spring cloud gateway error log

gateway will invoke com.huaweicloud.servicecomb.discovery.discovery.ServiceCombDiscoveryClient#getServices
get all service include which status are not UP.
that will cause a error log when invoke getInstances() following:
2020-01-06 10:24:35.968 ERROR 10112 --- [ main] c.h.c.ServiceCombPropertySourceLocator : read response failed. status=401;mesage=Unauthorized

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.