-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged networknt/light-4j#503 from master to 1.6.x
cherry-pick 26382993 Feat/#502 consul integrate test (#503) * Fixed the scope caching error * Added dependence of container test into pom * Moved the test cases to server module * Enhanced the registry test with testContainer. * Migrate consul container test to integration folder * Reverted unnecessary change * Changed name * Disable the integration test for mvn clean install * Removed unused line * -now integration test will copy the config under its own integration folder to the target folder -CURD some config files due to fix test cases (those were not configured correctly in previous versions) * -move integration plugins to integration-test profile -test configs will be generated either from integration folder or under test folder depends on the profile, cannot include both because file with same name will have only one copy under config directory in phase "generate-test-sources". -when run mvn clean install will as usual, when run mvn clean install -P integration-test will execute integration tests * fixes the typo # Conflicts: # pom.xml
- Loading branch information
Showing
34 changed files
with
323 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Handler middleware chain configuration | ||
--- | ||
enabled: true | ||
|
||
#------------------------------------------------------------------------------ | ||
# Support individual handler chains for each separate endpoint. It allows framework | ||
# handlers like health check, server info to bypass majority of the middleware handlers | ||
# and allows mixing multiple frameworks like OpenAPI and GraphQL in the same instance. | ||
# | ||
# handlers -- list of handlers to be used across chains in this microservice | ||
# including the routing handlers for ALL endpoints | ||
# -- format: fully qualified handler class name@optional:given name | ||
# chains -- allows forming of [1..N] chains, which could be wholly or | ||
# used to form handler chains for each endpoint | ||
# ex.: default chain below, reused partially across multiple endpoints | ||
# paths -- list all the paths to be used for routing within the microservice | ||
# ---- path: the URI for the endpoint (ex.: path: '/v1/pets') | ||
# ---- method: the operation in use (ex.: 'post') | ||
# ---- exec: handlers to be executed -- this element forms the list and | ||
# the order of execution for the handlers | ||
# | ||
# IMPORTANT NOTES: | ||
# - to avoid executing a handler, it has to be removed/commented out in the chain | ||
# or change the enabled:boolean to false for a middleware handler configuration. | ||
# - all handlers, routing handler included, are to be listed in the execution chain | ||
# - for consistency, give a name to each handler; it is easier to refer to a name | ||
# vs a fully qualified class name and is more elegant | ||
# - you can list in chains the fully qualified handler class names, and avoid using the | ||
# handlers element altogether | ||
#------------------------------------------------------------------------------ | ||
handlers: | ||
# Light-framework cross-cutting concerns implemented in the microservice | ||
- com.networknt.exception.ExceptionHandler@exception | ||
- com.networknt.metrics.MetricsHandler@metrics | ||
- com.networknt.traceability.TraceabilityHandler@traceability | ||
- com.networknt.correlation.CorrelationHandler@correlation | ||
# Cors handler to handler post/put pre-flight | ||
- com.networknt.cors.CorsHttpHandler@cors | ||
# - com.networknt.openapi.OpenApiHandler@specification | ||
# - com.networknt.openapi.JwtVerifyHandler@security | ||
# - com.networknt.body.BodyHandler@body | ||
# - com.networknt.audit.AuditHandler@audit | ||
# - com.networknt.sanitizer.SanitizerHandler@sanitizer | ||
# - com.networknt.openapi.ValidatorHandler@validator | ||
# Header middleware to manipulate request and/or response headers before or after downstream server | ||
# - com.networknt.header.HeaderHandler@header | ||
# Direct requests to named services based on the request path | ||
# - com.networknt.router.middleware.PathPrefixServiceHandler@path | ||
# - com.networknt.router.RouterHandler@router | ||
# - com.networknt.resource.PathResourceHandler@resource | ||
- com.networknt.rpc.router.JsonHandler@json | ||
# Customer business domain specific cross-cutting concerns handlers | ||
# - com.example.validator.CustomizedValidator@custvalidator | ||
# Framework endpoint handlers | ||
- com.networknt.health.HealthGetHandler@health | ||
- com.networknt.info.ServerInfoGetHandler@info | ||
# - com.networknt.metrics.prometheus.PrometheusGetHandler@getprometheus | ||
|
||
chains: | ||
default: | ||
- exception | ||
- metrics | ||
- traceability | ||
- correlation | ||
- json | ||
|
||
paths: | ||
- path: '/codegen' | ||
method: 'POST' | ||
exec: | ||
- default | ||
- path: '/codegen' | ||
method: 'GET' | ||
exec: | ||
- default | ||
|
||
- path: '/health/com.networknt.codegen-web-2.0.0' | ||
method: 'get' | ||
exec: | ||
- health | ||
|
||
# In most case, the /server/info endpoint shouldn't be exposed. If it is, then it must be protected by OAuth 2.0 or Basic Auth | ||
- path: '/server/info' | ||
method: 'get' | ||
exec: | ||
- info |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
description: RPC router description | ||
handlerPackage: 'com.networknt.codegen' | ||
jsonPath: /codegen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.