Questions tagged [light-4j]

This tag to be used for light-4j micro-service framework

This tag to be used for light-4j micro-service framework https://doc.networknt.com/faq/what-is-light-4j/

43 questions
0
votes
1 answer

Printing query parameters in access log for light-4j application?

My light-4j application is using AuditHandler to print access logs. The default format printed is: {"timestamp":1580470146236,"endpoint":"/mmt/register@post","X-Correlation-Id":"123456","statusCode":200,"responseTime":70} But, the client is hitting…
user1414435
  • 41
  • 1
  • 3
0
votes
1 answer

How to create light-4j fatjar for Docker

I'm trying to run your petstore-example and made it up to the building and running the server via mvn install exec:exec ... but now I'm trying to do the docker part: Where I wonder since you only ADD the petstore.jar to the docker-image, but not all…
Steve Hu
  • 358
  • 2
  • 10
0
votes
1 answer

How do we integrate access log in logback.xml for light-4j app?

How do we integrate the access logs in logback.xml? There is a class AccessLogHandler for this, but it does not implement MiddlewareHandler, so we cannot inject it in handlers.yml. Is there a simple way to log incoming HTTP requests in access.log…
Steve Hu
  • 358
  • 2
  • 10
0
votes
1 answer

Light-oauth hazelcast purpose

I've took a look on documentation. I don't quite figure out how hazelcast is used. I mean, I've look up on docker-like files, but I don't find any deployment of hazelcast. Which services make use of hazelcast? By other side, why do you use an imDg…
Jordi
  • 20,868
  • 39
  • 149
  • 333
0
votes
1 answer

when starting light-oauth2 images, it shows no route handler provider available in service.yml

I just run the light-oauth2 in docker-toolbox, but none of the images have been started, it mentioned: "no route handler provider available in service.yml". What the problem is?
Steve Hu
  • 358
  • 2
  • 10
0
votes
1 answer

How to integrate light-oauth2 services with existing user database?

https://doc.networknt.com/tutorial/oauth/user/ says that the oauth2 server can be integrated with an existing user database but gives no examples to accomplish that. Please provide an example of how to set up the oauth2 services in a docker stack…
Steve Hu
  • 358
  • 2
  • 10
0
votes
1 answer

Error: Could not find or load main class com.networknt.server.Server error

I have a quick question. Do you have a light-4j framework docker image hosted somewhere in which I can just add my API jar and run docker? I am getting a hard time running my APIs generated using codegen CLI in docker. It consistently gives me…
Steve Hu
  • 358
  • 2
  • 10
0
votes
1 answer

Is it possible to return an error for an extra query parameter shows up in light-4j request

I have a question about the light-rest-4j URL validation, for example, if I have a POST request path /party, if I type the path as /party11, I will get error: No handler defined for path /party11, but if I put /party?qqqq, It will pass through, and…
Steve Hu
  • 358
  • 2
  • 10
0
votes
1 answer

question related to REST call compatibility

I have a question related to REST call compatibility...say I have application-1 that understands some JSON that gets mapped to type-1 object, and it communicates with an upgraded application that sends JSON response of type-1 object but with added…
Steve Hu
  • 358
  • 2
  • 10
0
votes
2 answers

Light-4j server stops responding to HTTP GET or POST

I am facing some issue with 1.6.5 version. Sometimes the server stops replying to my http rest calls. The tcpdump indicated proper tcp hand-shake..and http request going. But no response comes from server. This is basic http get call and no…
0
votes
1 answer

A standalone light-4j client application cannot exit from main class

I have built a batch job which is called from enterprise scheduler to access a light-4j microservice to perform some daily tasks. The batch job is a standalone application uses the light-4j client module to invoke the microservice. A strange thing…
Steve Hu
  • 358
  • 2
  • 10
0
votes
1 answer

How do I configure the default ObjectMapper?

In light-4j config module, there is an ObjectMapper instance that is used in a lot of different places. I have a Rest/GraphQL hybrid application and want to customize the default ObjectMapper. What is the best way to do so?
Steve Hu
  • 358
  • 2
  • 10
0
votes
1 answer

How to use the CorsHttpHandler with handler.yml in light-4j application

I am running through the CORS tutorial here to add CORS into our project: https://doc.networknt.com/tutorial/middleware/cors/ and I think I am missing a step or something to review what I've tried: added the cors.yml file to…
Steve Hu
  • 358
  • 2
  • 10
0
votes
1 answer

Does the CorsHttpHandler in support wildcard to allow for any domain?

matchOrigin in https://github.com/networknt/light-4j/blob/master/cors/src/main/java/com/networknt/cors/CorsUtil.java doesn't seem to as far as I can tell. Do we need to specify specific port numbers in our allowedOrigins for cors.yml? i.e.…
Steve Hu
  • 358
  • 2
  • 10
0
votes
1 answer

how to build an application with light-4j that supports both Rest and GraphQL

I am building a new Rest service with several endpoints and also want to support GraphQL endpoint in the same instance, it is possible to do that with Light-4j?
Steve Hu
  • 358
  • 2
  • 10