Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.3.13 #268

Merged
merged 12 commits into from
Dec 24, 2023
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ build/
nbbuild/
dist/
nbdist/
src/test/
src/test/
.idea/
jexpress.iml
101 changes: 53 additions & 48 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.summerboot</groupId>
<artifactId>jexpress</artifactId>
<version>2.3.12</version>
<version>2.3.13</version>
<packaging>jar</packaging>
<name>Summer Boot jExpress</name>
<description>Summer Boot jExpress focuses on solving non-functional and operational maintainability requirements, some of which Spring Boot has (may) not yet provided</description>
<description>Summer Boot jExpress focuses on solving non-functional and operational maintainability requirements,
some of which Spring Boot has (may) not yet provided
</description>
<url>https://github.com/SummerBootFramework</url>
<organization>
<name>Summer Boot Org</name>
Expand All @@ -33,12 +36,16 @@
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>The jExpress licenses this framework to you under the Apache License, version 2.0 (the "License"); you may not use this framework except in compliance with the License and you have no policy prohibiting employee contributions back to this framework (unless the contributor to this framework is your current or retired employee).</comments>
<comments>The jExpress licenses this framework to you under the Apache License, version 2.0 (the "License");
you may not use this framework except in compliance with the License and you have no policy prohibiting
employee contributions back to this framework (unless the contributor to this framework is your current
or retired employee).
</comments>
</license>
</licenses>
<scm>
<url>https://github.com/SummerBootFramework/jExpress.git</url>
<connection>scm:git:[email protected]:SummerBootFramework/jExpress.git</connection>
<connection>scm:git:[email protected]:SummerBootFramework/jExpress.git</connection>
<developerConnection>scm:git:[email protected]:SummerBootFramework/jExpress.git</developerConnection>
</scm>
<!-- <build>
Expand All @@ -61,7 +68,7 @@
<profile>
<id>release</id>
<build>
<plugins>
<plugins>
<plugin>
<!--for unit test-->
<artifactId>maven-surefire-plugin</artifactId>
Expand Down Expand Up @@ -109,7 +116,7 @@
</execution>
</executions>
</plugin>

<!--Deploy-->
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
Expand Down Expand Up @@ -162,12 +169,12 @@
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</repository>
</distributionManagement>
</profile>
</profiles>
<properties>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
Expand All @@ -188,17 +195,17 @@
<jwt.version>0.11.5</jwt.version>

<!-- NIO Netty -->
<netty.version>4.1.101.Final</netty.version>
<netty.version>4.1.104.Final</netty.version>
<netty-tcnative.version>2.0.62.Final</netty-tcnative.version>
<!-- gRPC and protobuf -->
<grpc.version>1.59.1</grpc.version>
<guava.version>32.1.3-jre</guava.version>
<grpc.version>1.60.1</grpc.version>
<guava.version>33.0.0-jre</guava.version>
<protobuf.version>3.25.1</protobuf.version>
<!-- Web JAX-RS -->
<!-- Web JAX-RS -->
<swagger.core.version>2.2.19</swagger.core.version>
<!--<elastic-apm.version>1.36.0</elastic-apm.version>-->


<!-- MIME-Type -->
<tika.version>2.9.1</tika.version>
<!-- JAX-RS -->
Expand All @@ -216,12 +223,12 @@
<guice.version>7.0.0</guice.version>

<!-- JPA -->
<hibernate.version>6.4.0.Final</hibernate.version>
<hibernate.version>6.4.1.Final</hibernate.version>
<hikari-cp.version>5.1.0</hikari-cp.version>

<!-- Cache -->
<jedis.version>5.1.0</jedis.version>

<quartz.version>2.5.0-rc1</quartz.version>

<!-- Template Engine -->
Expand All @@ -230,15 +237,15 @@
<zxing.version>3.5.2</zxing.version>
<!-- PDF - PDFBox
<pdfbox.version>2.0.25</pdfbox.version>-->
<!-- PDF - com.openhtmltopdf -->
<!-- PDF - com.openhtmltopdf -->
<openhtml.version>1.0.10</openhtml.version>
<batik-transcoder.version>1.17</batik-transcoder.version>
<!-- PDF - iText -->
<itext7-core.version>8.0.2</itext7-core.version>
<itext7-html2pdf.version>5.0.2</itext7-html2pdf.version>

<!-- Testing -->
<testng.version>7.8.0</testng.version>
<testng.version>7.8.0</testng.version>
<jdbc.version>8.2.0</jdbc.version>
</properties>

Expand Down Expand Up @@ -276,7 +283,7 @@
<artifactId>encoder</artifactId>
<version>${owasp.encoder.version}</version>
</dependency>-->

<!-- Reflection -->
<!-- https://mvnrepository.com/artifact/org.reflections/reflections BSD 2-clause-->
<dependency>
Expand Down Expand Up @@ -304,7 +311,7 @@
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
<version>${log4j-disruptor.version}</version>
</dependency>
</dependency>
<!-- JDK Logging Adapter https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-jul -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand Down Expand Up @@ -369,7 +376,6 @@
</dependency>-->



<!-- NIO Netty -->
<!-- https://mvnrepository.com/artifact/io.netty/netty-all Apache 2.0-->
<dependency>
Expand Down Expand Up @@ -400,24 +406,24 @@
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-classes</artifactId>
<version>${netty-tcnative.version}</version>
</dependency>
</dependency>

<!-- gRPC and protobuf -->
<!-- https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java -->
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${protobuf.version}</version>
<!-- <scope>provided</scope>-->
</dependency>
</dependency>
<!-- https://mvnrepository.com/artifact/io.grpc/grpc-protobuf -->
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>${grpc.version}</version>
<!-- <scope>provided</scope>-->
</dependency>
<!-- security patch https://mvnrepository.com/artifact/com.google.guava/guava -->
<!-- grpc security patch https://mvnrepository.com/artifact/com.google.guava/guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand All @@ -439,14 +445,14 @@
<!-- <scope>provided</scope>-->
</dependency>

<!-- Open API -->
<!-- Open API -->
<!-- https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-annotations -->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.core.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/co.elastic.apm/apm-agent-api
<dependency>
<groupId>co.elastic.apm</groupId>
Expand Down Expand Up @@ -519,8 +525,8 @@
<artifactId>jackson-dataformat-xml</artifactId>
<version>${jackson.version}</version>
</dependency>


<!-- Bean Validation -->
<!-- https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator -->
<dependency>
Expand All @@ -537,7 +543,7 @@
</dependency>

<!-- Injection -->
<!-- https://mvnrepository.com/artifact/com.google.inject/guice Apache 2.0-->
<!-- https://mvnrepository.com/artifact/com.google.inject/guice Apache 2.0-->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
Expand Down Expand Up @@ -581,8 +587,8 @@
<version>${jedis.version}</version>
<scope>provided</scope>
</dependency>


<!-- Scheduler -->
<!-- https://mvnrepository.com/artifact/org.quartz-scheduler/quartz -->
<dependency>
Expand Down Expand Up @@ -610,7 +616,7 @@
<artifactId>freemarker</artifactId>
<version>${freemarker.version}</version>
</dependency>

<!-- Barcode -->
<!-- ZXing (“zebra crossing”) is an open-source, multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. This is the main library that supports QR codes in Java. -->
<!-- https://mvnrepository.com/artifact/com.google.zxing/core -->
Expand All @@ -627,8 +633,7 @@
<version>${zxing.version}</version>
<scope>provided</scope>
</dependency>




<!-- PDF - iText -->
<!-- https://mvnrepository.com/artifact/com.itextpdf/itext7-core AGPL 3.0-->
Expand All @@ -652,8 +657,8 @@
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>${pdfbox.version}</version>
</dependency>-->
</dependency>-->

<!-- PDF - com.openhtmltopdf -->
<!-- https://mvnrepository.com/artifact/com.openhtmltopdf/openhtmltopdf-pdfbox LGPL 2.1-->
<dependency>
Expand All @@ -667,19 +672,19 @@
<groupId>com.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-pdfbox</artifactId>
<version>${openhtml.version}</version>
</dependency>
</dependency>
<dependency>
<!-- Required for image output only. -->
<!-- Required for image output only. -->
<groupId>com.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-java2d</artifactId>
<version>${openhtml.version}</version>
</dependency>
</dependency>
<dependency>
<!-- Optional, leave out if you do not need right-to-left or bi-directional text support. -->
<groupId>com.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-rtl-support</artifactId>
<version>${openhtml.version}</version>
</dependency>
</dependency>
<dependency>
<!-- Optional, leave out if you do not need logging via slf4j. -->
<groupId>com.openhtmltopdf</groupId>
Expand All @@ -691,7 +696,7 @@
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependency>
<dependency>
<!-- Optional, leave out if you do not need SVG support. -->
<groupId>com.openhtmltopdf</groupId>
Expand All @@ -712,7 +717,7 @@
<artifactId>openhtmltopdf-mathml-support</artifactId>
<version>${openhtml.version}</version>
</dependency>

<!-- Document to Image -->
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-all
<dependency>
Expand All @@ -737,6 +742,6 @@
<artifactId>mysql-connector-j</artifactId>
<version>${jdbc.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependency>
</dependencies>
</project>
25 changes: 16 additions & 9 deletions src/main/java/org/summerboot/jexpress/boot/BackOffice.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
*/
package org.summerboot.jexpress.boot;

import org.summerboot.jexpress.boot.config.BootConfig;
import org.summerboot.jexpress.boot.config.ConfigUtil;
import org.summerboot.jexpress.boot.config.annotation.Config;
import org.summerboot.jexpress.boot.config.annotation.ConfigHeader;
import org.summerboot.jexpress.util.ReflectionUtil;

import java.io.File;
import java.util.HashMap;
import java.util.LinkedHashMap;
Expand All @@ -23,15 +29,8 @@
import java.util.Set;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.stream.Collectors;
import org.summerboot.jexpress.boot.config.BootConfig;
import static org.summerboot.jexpress.boot.config.BootConfig.generateTemplate;
import org.summerboot.jexpress.boot.config.ConfigUtil;
import org.summerboot.jexpress.boot.config.annotation.Config;
import org.summerboot.jexpress.boot.config.annotation.ConfigHeader;
import org.summerboot.jexpress.util.ReflectionUtil;

/**
*
* @author Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵
*/
public class BackOffice extends BootConfig {
Expand Down Expand Up @@ -60,8 +59,8 @@ protected void loadCustomizedConfigs(File cfgFile, boolean isReal, ConfigUtil he
prestartAllCoreThreads, allowCoreThreadTimeOut, false);

Runtime.getRuntime().addShutdownHook(new Thread(() -> {
tpe.shutdown();
}, "ShutdownHook.BackOffice")
tpe.shutdown();
}, "ShutdownHook.BackOffice")
);
}

Expand All @@ -75,6 +74,7 @@ public static void execute(Runnable task) {
}
agent.tpe.execute(task);
}

protected ThreadPoolExecutor tpe;
private String pingURL;
private String version;
Expand Down Expand Up @@ -150,6 +150,9 @@ public Map<Integer, Integer> getBootErrorCodeMapping() {
private Set<String> rootPackageNames;

@ConfigHeader(title = "3. Default Settings")
@Config(key = "log.traceWithSystemOut", defaultValue = "false", desc = "enable trace with system out before logger enabled")
private boolean traceWithSystemOut = false;

@Config(key = "type.errorCodeAsInt", defaultValue = "false")
private boolean errorCodeAsInt = false;

Expand Down Expand Up @@ -288,6 +291,10 @@ public Set<String> getRootPackageNames() {
return rootPackageNames;
}

public boolean isTraceWithSystemOut() {
return traceWithSystemOut;
}

public boolean isErrorCodeAsInt() {
return errorCodeAsInt;
}
Expand Down
Loading
Loading