A fast, lightweight and more productive microservices framework
APACHE-2.0 License
Bot releases are visible (Hide)
Published by stevehu almost 6 years ago
Fixed bugs:
Closed issues:
Merged pull requests:
Upgrade Guidelines:
Published by stevehu almost 6 years ago
Implemented enhancements:
Fixed bugs:
Upgrade Guidelines:
Published by stevehu about 6 years ago
Fixed bugs:
Closed issues:
Upgrade Guidelines:
Published by stevehu about 6 years ago
Fixed bugs:
Closed issues:
Merged pull requests:
Upgrade Guidelines:
This release added more features and fixed several bugs. It should be backward compatible for most existing services. Just update the pom.xml version should work from previous release 1.5.18. If you are in an older version, please follow the guideline to upgrade to 1.5.18 first or just regenerate your project with the latest light-codegen.
Published by stevehu about 6 years ago
Implemented enhancements:
Fixed bugs:
Closed issues:
Merged pull requests:
Upgrade Guidelines:
<version.undertow>2.0.11.Final</version.undertow>
<version.json-schema-validator>0.1.21</version.json-schema-validator>
# Consul URL for accessing APIs
consulUrl: https://198.55.49.188:8500
# deregister the service after the amount of time after health check failed.
deregisterAfter: 2m
# health check interval for TCP or HTTP check. Or it will be the TTL for TTL check. Every 10 seconds,
# TCP or HTTP check request will be sent. Or if there is no heartbeat request from service after 10 seconds,
# then mark the service is critical.
checkInterval: 10s
# One of the following health check approach will be selected. Two passive (TCP and HTTP) and one active (TTL)
# enable health check TCP. Ping the IP/port to ensure that the service is up. This should be used for most of
# the services with simple dependencies. If the port is open on the address, it indicates that the service is up.
tcpCheck: false
# enable health check HTTP. An HTTP get request will be sent to the service to ensure that 200 response status is
# coming back. This is suitable for a service that depends on a database or other infrastructure services. You should
# implement a customized health check handler that checks dependencies. i.e. if DB is down, return status 400.
httpCheck: true
# enable health check TTL. When this is enabled, Consul won't actively check your service to ensure it is healthy,
# but your service will call check endpoint with a heartbeat to indicate it is alive. This requires that the service
# is built on top of light-4j and the above options are not available. For example, your service is behind NAT.
ttlCheck: false
Here is the document on how to use it.
https://doc.networknt.com/tutorial/common/discovery/http-health/
- com.networknt.consul.client.ConsulClient:
- com.networknt.consul.client.ConsulClientImpl
A new handler.yml has been introduced to support multiple middleware handler chains. For more detail please refer to https://doc.networknt.com/concern/handler/
All config files in tls and oauth subfolders are moved to the parent config directory for Kubernetes and Openshift secrets creation. The following files have references to the files in sub folders before and need to be updated. server.yml, client.yml, security.yml and jwt.yml
Published by stevehu over 6 years ago
Implemented enhancements:
Closed issues:
Merged pull requests:
Upgrade Guidelines:
Most changes in this release are backward compatible except the HandlerProvider package name change. If you have an existing project, you need to update two different places.
# HandlerProvider implementation
- com.networknt.server.HandlerProvider:
- com.networknt.oauth.client.PathHandlerProvider
change to
# HandlerProvider implementation
- com.networknt.handler.HandlerProvider:
- com.networknt.oauth.client.PathHandlerProvider
If you have too many projects that need to be updated in a batch, please take a look at regex-replace at https://github.com/networknt/light-config-test/tree/master/light-bot/regex-replace/replace-all
Here is the section in the config file.
- glob: "{**/service.yml,**/service.yml.rocker.raw}"
match: com.networknt.server.HandlerProvider
old_value: "server"
new_value: "handler"
- glob: "{**/*.java}"
match: com.networknt.server.HandlerProvider
old_value: "server"
new_value: "handler"
Published by stevehu over 6 years ago
Implemented enhancements:
Closed issues:
Merged pull requests:
Upgrade Guidelines:
All changes in this release are backward-compatible, so you can just update the version number in your pom.xml file. The following enhancements might be useful for you though:
A new property buildNumber has been added to the server.yml from light-codegen. This variable can be used for auditing in your API.
It is highly recommended to use LightHttpHandler interface instead of HttpHandler as it contains a default method to handle error status.
Published by stevehu over 6 years ago
Closed issues:
Merged pull requests:
Upgrade Guidelines
There is no API change for this release; however, the following three config files have been updated:
# Fresh token client secret for OAuth2 server
refreshTokenClientSecret: f6h1FTI8Q3-7UScPZDzfXA
# If OAuth2 provider support http2 protocol. If using light-oauth2, set this to true.
oauthHttp2Support: true
# set to true if the oauth2 provider supports HTTP/2
enableHttp2: true
refresh_token:
# token endpoint for refresh token grant
uri: "/oauth2/token"
# client_id for refresh token grant flow. client_secret is in secret.yml
client_id: f7d42348-c647-4efb-a52d-4c5787421e72
# optional scope, default scope in the client registration will be used if not defined.
scope:
- petstore.r
- petstore.w
For details, please refer to https://github.com/networknt/light-4j/blob/master/client/src/main/resources/config/client.yml
Published by stevehu over 6 years ago
Closed issues:
Upgrade Guidelines:
There is no functional change in this release but only upgrade the versions of dependencies after black duck security scan. Here is the new version of each library.
<version.jackson>2.9.5</version.jackson>
<version.slf4j>1.7.25</version.slf4j>
<version.jose4j>0.6.3</version.jose4j>
<version.commons.codec>1.11</version.commons.codec>
<version.encoder>1.2.1</version.encoder>
<version.logback>1.2.3</version.logback>
<version.junit>4.12</version.junit>
<version.mockito>2.10.0</version.mockito>
<version.undertow>1.4.23.Final</version.undertow>
<version.swagger-parser>1.0.34</version.swagger-parser>
<version.hamcrest>1.3</version.hamcrest>
<version.assertj>3.8.0</version.assertj>
<version.hdrhistogram>2.1.10</version.hdrhistogram>
<version.jsr305>3.0.2</version.jsr305>
<version.json-schema-validator>0.1.18</version.json-schema-validator>
<version.zookeeper>3.5.3-beta</version.zookeeper>
<version.zkclient>0.3</version.zkclient>
<version.curator>4.0.1</version.curator>
<version.snakeyaml>1.20</version.snakeyaml>
<version.caffeine>2.6.2</version.caffeine>
<version.prometheus>0.3.0</version.prometheus>
<version.javamail>1.6.1</version.javamail>
Published by stevehu over 6 years ago
Fixed bugs:
Closed issues:
Merged pull requests:
Published by stevehu over 6 years ago
Closed issues:
Merged pull requests:
Upgrade Guide:
To support Kubernetes cluster deployment and client side service discovery, the server cannot be started with both http and https. If both are enabled, then https will be used.
The server module has been enhanced to support dynamic port allocation and self registration on Kubernetes cluster. The following section has been added to the server.yml config file. If you are not using the feature, you don't need to include the block. This change is backward compatible. Example can be found at https://github.com/networknt/light-example-4j/blob/master/discovery/api_a/kubernetes/src/main/resources/config/server.yml
There is Kubernetes tutorial on how to use it as part of the service registry and discovery.
# Dynamic port is used in situation that multiple services will be deployed on the same host and normally
# you will have enableRegistry set to true so that other services can find the dynamic port service. When
# deployed to Kubernetes cluster, the Pod must be annotated as hostNetwork: true
dynamicPort: false
# Minimum port range. This define a range for the dynamic allocated ports so that it is easier to setup
# firewall rule to enable this range. Default 2400 to 2500 block has 100 port numbers and should be
# enough for most cases unless you are using a big bare metal box as Kubernetes node that can run 1000s pods
minPort: 2400
# Maximum port rang. The range can be customized to adopt your network security policy and can be increased or
# reduced to ease firewall rules.
maxPort: 2500
Published by stevehu over 6 years ago
Closed issues:
Merged pull requests:
** Upgrade guideline: **
This release contains small enhancements so no config file changes. Just change the pom.xml version number to 1.5.8 from 1.5.7 will do.
Published by stevehu almost 7 years ago
Fixed bugs:
Closed issues:
Upgrade Guide:
In this release, a new email module is added for sending emails and the emailPassword is added to the secret.yml file. Other than this, the release is backward compatible with 1.5.5
# EmailSender password default address is [email protected]
emailPassword: change-to-real-password
Published by stevehu almost 7 years ago
This release is backward compatible and you can just update your pom.xml version from 1.5.4 to 1.5.5 for
your current project. However, to take advantages of this release there are certain configuration files need
to be updated.
If you are using client module, you should make some change to connect to light-oauth2 server with https
The example of client.yml can be found at https://github.com/networknt/light-4j/blob/master/client/src/main/resources/config/client.yml
security.yml has been changed to add a new config entry bootstrapFromKeyService and default value is false.
The example of security.yml can be found at https://github.com/networknt/light-4j/blob/master/security/src/main/resources/config/security.yml
And here is a tutorial to learn how to use this feature.
service module has been refactored to allow POJO to be injected instead only interface and implementations.
also you can manually inject beans into the service map for debugging. There is a tutorial that show how to use these features.
secret.yml password or client_secret can be encrypted with customized encryption utility and decryptor class.
A tutorial shows all the steps to utilize it if your company has policy to prevent clear text password in config files.
Full client callback functions are provided so that you can have exceptions in the called to be propagated to the caller thread. Also, the response time is returned for metrics collection. The source code can be found at https://github.com/networknt/light-4j/blob/master/client/src/main/java/com/networknt/client/Http2Client.java#L615 and an test case to show you how to use it at https://github.com/networknt/light-4j/blob/master/client/src/test/java/com/networknt/client/Http2ClientTest.java#L367
cors.yml has been updated to add some comments and there is an updated tutorial on how to use it.
Published by stevehu almost 7 years ago
This release is an upgrade release from 1.5.1 and there are two major changes.
For existing applications built with light-4j 1.5.1, there is no dependency change so you can just update the version number from 1.5.1 to 1.5.4 in your pom.xml. However, there are configuration change in this release to switch Java SPI to service.yml for server startup, shutdown, middleware handler and route handler. It requires you to manually modify your service.yml file (create a new one if there is no service.yml in src/main/resources/config folder) to add these entries. Example can be found at https://github.com/networknt/light-example-4j/blob/master/rest/swagger/petstore/src/main/resources/config/service.yml and the documentation can be found at https://doc.networknt.com/concern/server/