瀏覽代碼

upgrade smart-servlet to 1.4

zhengjw22 1 年之前
父節點
當前提交
176adc514b

+ 1 - 1
frameworks/Java/smart-socket/pom.xml

@@ -11,7 +11,7 @@
         <maven.compiler.source>17</maven.compiler.source>
         <maven.compiler.target>17</maven.compiler.target>
         <log4j.version>2.17.1</log4j.version>
-        <smartservlet.version>1.0-SNAPSHOT</smartservlet.version>
+        <smartservlet.version>1.4</smartservlet.version>
         <hikaricp.version>5.0.0</hikaricp.version>
         <jsoniter.version>0.9.23</jsoniter.version>
     </properties>

+ 1 - 0
frameworks/Java/smart-socket/src/main/java/org/smartboot/http/Bootstrap.java

@@ -51,6 +51,7 @@ public class Bootstrap {
         HttpBootstrap bootstrap = new HttpBootstrap();
         bootstrap.configuration()
                 .threadNum(cpuNum)
+                .headerLimiter(0)
                 .readBufferSize(1024 * 4)
                 .writeBufferSize(1024 * 4)
                 .readMemoryPool(16384 * 1024 * 4)

+ 2 - 1
frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/Bootstrap.java

@@ -17,7 +17,7 @@ public class Bootstrap {
     public static void main(String[] args) throws Throwable {
         ContainerRuntime containerRuntime = new ContainerRuntime();
         // plaintext
-        ServletContextRuntime applicationRuntime = new ServletContextRuntime("/");
+        ServletContextRuntime applicationRuntime = new ServletContextRuntime(null, Thread.currentThread().getContextClassLoader(), "/");
         ServletInfo plainTextServletInfo = new ServletInfo();
         plainTextServletInfo.setServletName("plaintext");
         plainTextServletInfo.setServletClass(HelloWorldServlet.class.getName());
@@ -38,6 +38,7 @@ public class Bootstrap {
         bootstrap.configuration()
                 .threadNum(cpuNum)
                 .bannerEnabled(false)
+                .headerLimiter(0)
                 .readBufferSize(1024 * 4)
                 .writeBufferSize(1024 * 4)
                 .readMemoryPool(16384 * 1024 * 4)