Skip to content

1.5.0

Compare
Choose a tag to compare
@stevehu stevehu released this 21 Oct 03:55
· 1910 commits to master since this release

1.5.0 - 2017-10-20

Added

  • fixes #118 add a header handler to manipulate request/response headers

Changed

  • fixes #116 add environment tag for consul resgistry and discovery
  • fixes #117 Add SecretConfig to model secret.yml and add consulToken
  • fixes #114 Add utilities classes for light-workflow-4j
  • fixes #112 remove unused dependencies to reduce the final jar size.
  • fixes #111 add utility interfaces for exchange access. (Thanks @sachinwalia2k8)
  • fixes #107 upgrade dependencies to the latest. (Thanks @sachinwalia2k8)
  • Upgrade to 1.5.0

Upgrade Guide

There are several changes in the configuration files and API.

  1. Add environment tag in server.yml and default is disabled.
# environment tag that will be registered on consul to support multiple instances per env for testing.
# https://github.com/networknt/light-doc/blob/master/docs/content/design/env-segregation.md
# This tag should only be set for testing env, not production. The production certification process will enforce it.
# environment: test1
  1. Add consulToken in secret.yml
# Consul service registry and discovery and default is disable.

# Consul Token for service registry and discovery
# consulToken: the_one_ring
  1. Change the Cluster interface to add tag which is breaking change.
public interface Cluster {
    /**
     * give a service name and return a url with http or https url
     * the result is has been gone through the load balance with request key
     *
     * requestKey is used to control the behavior of load balance except
     * round robin and local first which this value is null. For consistent hash
     * load balance, normally client_id or user_id from JWT token should be passed
     * in to route the same client to the same server all the time or the same user
     * to the same server all the time
     *
     * @param protocol either http or https
     * @param serviceId unique service identifier
     * @param tag an environment tag use along with serviceId for discovery
     * @param requestKey load balancer key
     * @return String url
     */
    String serviceToUrl(String protocol, String serviceId, String tag, String requestKey);
}

Dependencies

The dependencies tree can be found here