Browse Source

update hserver version (#7015)

* hserver framework submit

* hserver framework submit

* lowercase fix

* Required response header missing: Date fix

* Date format fix

* update hserver version

* update hserver threadPool

* update hserver

* update hserver

Co-authored-by: 黑小马 <[email protected]>
黑小马 3 years ago
parent
commit
04814eabe5

+ 1 - 1
frameworks/Java/hserver/pom.xml

@@ -11,7 +11,7 @@
         <dependency>
         <dependency>
             <groupId>top.hserver</groupId>
             <groupId>top.hserver</groupId>
             <artifactId>HServer</artifactId>
             <artifactId>HServer</artifactId>
-            <version>2.9.73</version>
+            <version>2.9.80</version>
         </dependency>
         </dependency>
     </dependencies>
     </dependencies>
     <build>
     <build>

+ 2 - 0
frameworks/Java/hserver/src/main/java/com/test/hserver/StartApp.java

@@ -2,6 +2,7 @@ package com.test.hserver;
 
 
 import top.hserver.HServerApplication;
 import top.hserver.HServerApplication;
 import top.hserver.core.ioc.annotation.HServerBoot;
 import top.hserver.core.ioc.annotation.HServerBoot;
+import top.hserver.core.server.context.ConstConfig;
 
 
 /**
 /**
  * @author hxm
  * @author hxm
@@ -10,6 +11,7 @@ import top.hserver.core.ioc.annotation.HServerBoot;
 public class StartApp {
 public class StartApp {
 
 
     public static void main(String[] args) {
     public static void main(String[] args) {
+        ConstConfig.workerPool=Runtime.getRuntime().availableProcessors();
         HServerApplication.run(StartApp.class, 8888, args);
         HServerApplication.run(StartApp.class, 8888, args);
     }
     }
 }
 }

+ 1 - 2
frameworks/Java/hserver/src/main/java/com/test/hserver/util/DateUtil.java

@@ -10,8 +10,7 @@ import java.util.Locale;
  */
  */
 public class DateUtil {
 public class DateUtil {
     private static final DateTimeFormatter GMT_FMT = DateTimeFormatter.ofPattern("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US);
     private static final DateTimeFormatter GMT_FMT = DateTimeFormatter.ofPattern("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US);
-    private static ZoneId zoneId = ZoneId.of("GMT");
-
+    private static final ZoneId zoneId = ZoneId.of("GMT");
     public static String getNow() {
     public static String getNow() {
         return GMT_FMT.format(LocalDateTime.now().atZone(zoneId));
         return GMT_FMT.format(LocalDateTime.now().atZone(zoneId));
     }
     }