Skip to content

Commit cf9e177

Browse files
committed
Merge branch 'develop'
2 parents c77d2fc + dd38064 commit cf9e177

File tree

8 files changed

+79
-109
lines changed

8 files changed

+79
-109
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
| Framework | Language | Max Throughput | Avg Latency | Transfer |
77
| ------------ | ---------: | -------------: | ----------: | -------: |
88
| Go FastHttp | Go | 1,396,685.83 | 99.98ms | 167.83MB |
9-
| Light Java | Java | 1,344,512.65 | 2.36ms | 169.25MB |
9+
| Light-4j | Java | 1,344,512.65 | 2.36ms | 169.25MB |
1010
| ActFramework | Java | 945,429.13 | 2.22ms | 136.15MB |
1111
| Go Iris | Go | 828,035.66 | 5.77ms | 112.92MB |
1212
| Vertx | Java | 803,311.31 | 2.37ms | 98.06MB |

light-java/a/pom.xml renamed to light-4j/pom.xml

Lines changed: 15 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,47 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2-
<parent>
3-
<groupId>org.sonatype.oss</groupId>
4-
<artifactId>oss-parent</artifactId>
5-
<version>5</version>
6-
</parent>
72
<modelVersion>4.0.0</modelVersion>
8-
<groupId>io.swagger</groupId>
9-
<artifactId>swagger-light-java</artifactId>
3+
<groupId>com.networknt</groupId>
4+
<artifactId>plaintext</artifactId>
105
<packaging>jar</packaging>
11-
<name>swagger-light-java</name>
6+
<name>plaintext</name>
127
<version>1.0.0</version>
13-
<prerequisites>
14-
<maven>2.2.0</maven>
15-
</prerequisites>
168

179
<properties>
1810
<java.version>1.8</java.version>
1911
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20-
<version.framework>0.1.7</version.framework>
21-
<version.jackson>2.8.2</version.jackson>
22-
<version.slf4j>1.7.21</version.slf4j>
23-
<version.jose4j>0.6.3</version.jose4j>
24-
<version.antlr4>4.5.3</version.antlr4>
25-
<version.commons-lang>2.6</version.commons-lang>
26-
<version.commons.io>2.5</version.commons.io>
27-
<version.commons.codec>1.11</version.commons.codec>
28-
<version.encoder>1.2</version.encoder>
29-
<version.metrics>3.1.2</version.metrics>
30-
<version.logback>1.1.7</version.logback>
12+
<version.light-4j>1.5.19</version.light-4j>
13+
<version.jackson>2.9.5</version.jackson>
14+
<version.slf4j>1.7.25</version.slf4j>
15+
<version.logback>1.2.3</version.logback>
3116
<version.junit>4.12</version.junit>
32-
<version.mockito>2.1.0-beta.124</version.mockito>
33-
<version.undertow>1.4.23.Final</version.undertow>
34-
<version.jsonpath>2.2.0</version.jsonpath>
35-
<version.httpclient>4.5.2</version.httpclient>
36-
<version.httpasyncclient>4.1.2</version.httpasyncclient>
37-
<version.swagger>1.5.10</version.swagger>
17+
<version.undertow>2.0.11.Final</version.undertow>
3818
</properties>
3919

4020
<dependencies>
4121
<dependency>
4222
<groupId>com.networknt</groupId>
4323
<artifactId>config</artifactId>
44-
<version>${version.framework}</version>
24+
<version>${version.light-4j}</version>
4525
</dependency>
4626
<dependency>
4727
<groupId>com.networknt</groupId>
4828
<artifactId>utility</artifactId>
49-
<version>${version.framework}</version>
29+
<version>${version.light-4j}</version>
5030
</dependency>
5131
<dependency>
5232
<groupId>com.networknt</groupId>
53-
<artifactId>security</artifactId>
54-
<version>${version.framework}</version>
55-
</dependency>
56-
<dependency>
57-
<groupId>com.networknt</groupId>
58-
<artifactId>client</artifactId>
59-
<version>${version.framework}</version>
60-
</dependency>
61-
<dependency>
62-
<groupId>com.networknt</groupId>
63-
<artifactId>audit</artifactId>
64-
<version>${version.framework}</version>
65-
</dependency>
66-
<dependency>
67-
<groupId>com.networknt</groupId>
68-
<artifactId>info</artifactId>
69-
<version>${version.framework}</version>
70-
</dependency>
71-
<dependency>
72-
<groupId>com.networknt</groupId>
73-
<artifactId>validator</artifactId>
74-
<version>${version.framework}</version>
75-
</dependency>
76-
<dependency>
77-
<groupId>com.networknt</groupId>
78-
<artifactId>status</artifactId>
79-
<version>${version.framework}</version>
80-
</dependency>
81-
<dependency>
82-
<groupId>com.networknt</groupId>
83-
<artifactId>exception</artifactId>
84-
<version>${version.framework}</version>
85-
</dependency>
86-
<dependency>
87-
<groupId>com.networknt</groupId>
88-
<artifactId>body</artifactId>
89-
<version>${version.framework}</version>
90-
</dependency>
91-
<dependency>
92-
<groupId>com.networknt</groupId>
93-
<artifactId>mask</artifactId>
94-
<version>${version.framework}</version>
95-
</dependency>
96-
<dependency>
97-
<groupId>com.networknt</groupId>
98-
<artifactId>swagger</artifactId>
99-
<version>${version.framework}</version>
100-
</dependency>
101-
<dependency>
102-
<groupId>com.networknt</groupId>
103-
<artifactId>metrics</artifactId>
104-
<version>${version.framework}</version>
33+
<artifactId>handler</artifactId>
34+
<version>${version.light-4j}</version>
10535
</dependency>
10636
<dependency>
10737
<groupId>com.networknt</groupId>
108-
<artifactId>handler</artifactId>
109-
<version>${version.framework}</version>
38+
<artifactId>service</artifactId>
39+
<version>${version.light-4j}</version>
11040
</dependency>
11141
<dependency>
11242
<groupId>com.networknt</groupId>
11343
<artifactId>server</artifactId>
114-
<version>${version.framework}</version>
44+
<version>${version.light-4j}</version>
11545
</dependency>
11646

11747
<dependency>
@@ -124,11 +54,6 @@
12454
<artifactId>jackson-core</artifactId>
12555
<version>${version.jackson}</version>
12656
</dependency>
127-
<dependency>
128-
<groupId>com.jayway.jsonpath</groupId>
129-
<artifactId>json-path</artifactId>
130-
<version>${version.jsonpath}</version>
131-
</dependency>
13257
<dependency>
13358
<groupId>ch.qos.logback</groupId>
13459
<artifactId>logback-classic</artifactId>
@@ -139,11 +64,6 @@
13964
<artifactId>undertow-core</artifactId>
14065
<version>${version.undertow}</version>
14166
</dependency>
142-
<dependency>
143-
<groupId>io.swagger</groupId>
144-
<artifactId>swagger-annotations</artifactId>
145-
<version>${version.swagger-parser}</version>
146-
</dependency>
14767

14868
<!-- Test Dependencies -->
14969
<dependency>
@@ -152,13 +72,6 @@
15272
<version>${version.junit}</version>
15373
<scope>test</scope>
15474
</dependency>
155-
<dependency>
156-
<groupId>org.apache.httpcomponents</groupId>
157-
<artifactId>httpclient</artifactId>
158-
<version>${version.httpclient}</version>
159-
<scope>test</scope>
160-
</dependency>
161-
16275
</dependencies>
16376

16477

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Server configuration
2+
---
3+
# This is the default binding address if the service is dockerized.
4+
ip: 0.0.0.0
5+
6+
# Http port if enableHttp is true. It will be ignored if dynamicPort is true.
7+
httpPort: 8080
8+
9+
# Enable HTTP should be false by default. It should be only used for testing with clients or tools
10+
# that don't support https or very hard to import the certificate. Otherwise, https should be used.
11+
# When enableHttp, you must set enableHttps to false, otherwise, this flag will be ignored. There is
12+
# only one protocol will be used for the server at anytime. If both http and https are true, only
13+
# https listener will be created and the server will bind to https port only.
14+
enableHttp: true
15+
16+
# Https port if enableHttps is true. It will be ignored if dynamicPort is true.
17+
httpsPort: 8443
18+
19+
# Enable HTTPS should be true on official environment and most dev environments.
20+
enableHttps: false
21+
22+
# Http/2 is enabled by default for better performance and it works with the client module
23+
enableHttp2: false
24+
25+
# Keystore file name in config folder. KeystorePass is in secret.yml to access it.
26+
keystoreName: server.keystore
27+
28+
# Flag that indicate if two way TLS is enabled. Not recommended in docker container.
29+
enableTwoWayTls: false
30+
31+
# Truststore file name in config folder. TruststorePass is in secret.yml to access it.
32+
truststoreName: server.truststore
33+
34+
# Unique service identifier. Used in service registration and discovery etc.
35+
serviceId: com.networknt.plaintext-1.0.0
36+
37+
# Flag to enable self service registration. This should be turned on on official test and production. And
38+
# dyanmicPort should be enabled if any orchestration tool is used like Kubernetes.
39+
enableRegistry: false
40+
41+
# Dynamic port is used in situation that multiple services will be deployed on the same host and normally
42+
# you will have enableRegistry set to true so that other services can find the dynamic port service. When
43+
# deployed to Kubernetes cluster, the Pod must be annotated as hostNetwork: true
44+
dynamicPort: false
45+
46+
# Minimum port range. This define a range for the dynamic allocated ports so that it is easier to setup
47+
# firewall rule to enable this range. Default 2400 to 2500 block has 100 port numbers and should be
48+
# enough for most cases unless you are using a big bare metal box as Kubernetes node that can run 1000s pods
49+
minPort: 2400
50+
51+
# Maximum port rang. The range can be customized to adopt your network security policy and can be increased or
52+
# reduced to ease firewall rules.
53+
maxPort: 2500
54+
55+
# environment tag that will be registered on consul to support multiple instances per env for testing.
56+
# https://github.com/networknt/light-doc/blob/master/docs/content/design/env-segregation.md
57+
# This tag should only be set for testing env, not production. The production certification process will enforce it.
58+
# environment: test1
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Singleton service factory configuration/IoC injection
2+
singletons:
3+
# HandlerProvider implementation
4+
- com.networknt.handler.HandlerProvider:
5+
- Example

light-java/a/src/main/resources/META-INF/services/com.networknt.server.HandlerProvider

Lines changed: 0 additions & 1 deletion
This file was deleted.

light-java/a/src/main/resources/config/server.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)