Merge pull request #5716 from EightMonth/springboot3

升级fastjson至2.0.43,替换tomcat为undertow
This commit is contained in:
JEECG
2023-12-26 17:21:30 +08:00
committed by GitHub
9 changed files with 85 additions and 45 deletions

View File

@ -1,33 +1,33 @@
package org.jeecg.config.init;
import org.apache.catalina.Context;
import org.apache.tomcat.util.scan.StandardJarScanner;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Description: TomcatFactoryConfig
* @author: scott
* @date: 2021年01月25日 11:40
*/
@Configuration
public class TomcatFactoryConfig {
/**
* tomcat-embed-jasper引用后提示jar找不到的问题
*/
@Bean
public TomcatServletWebServerFactory tomcatFactory() {
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory() {
@Override
protected void postProcessContext(Context context) {
((StandardJarScanner) context.getJarScanner()).setScanManifest(false);
}
};
factory.addConnectorCustomizers(connector -> {
connector.setProperty("relaxedPathChars", "[]{}");
connector.setProperty("relaxedQueryChars", "[]{}");
});
return factory;
}
}
//package org.jeecg.config.init;
//
//import org.apache.catalina.Context;
//import org.apache.tomcat.util.scan.StandardJarScanner;
//import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @Description: TomcatFactoryConfig
// * @author: scott
// * @date: 2021年01月25日 11:40
// */
//@Configuration
//public class TomcatFactoryConfig {
// /**
// * tomcat-embed-jasper引用后提示jar找不到的问题
// */
// @Bean
// public TomcatServletWebServerFactory tomcatFactory() {
// TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory() {
// @Override
// protected void postProcessContext(Context context) {
// ((StandardJarScanner) context.getJarScanner()).setScanManifest(false);
// }
// };
// factory.addConnectorCustomizers(connector -> {
// connector.setProperty("relaxedPathChars", "[]{}");
// connector.setProperty("relaxedQueryChars", "[]{}");
// });
// return factory;
// }
//}

View File

@ -1,7 +1,12 @@
server:
port: 8080
tomcat:
max-swallow-size: -1
undertow:
# 平替 tomcat server.tomcat.max-swallow-siz undertow该值默认为-1
# max-http-post-size: 10MB
worker-threads: 16 # 4核CPU标准配置
buffers:
websocket: 8192 # WebSocket缓冲 以字节为单位这里设置为8 KB
io: 16384 # IO操作缓冲 以字节为单位这里设置为16 KB
error:
include-exception: true
include-stacktrace: ALWAYS

View File

@ -1,7 +1,12 @@
server:
port: 8080
tomcat:
max-swallow-size: -1
undertow:
# 平替 tomcat server.tomcat.max-swallow-siz undertow该值默认为-1
# max-http-post-size: 10MB
worker-threads: 16 # 4核CPU标准配置
buffers:
websocket: 8192 # WebSocket缓冲 以字节为单位这里设置为8 KB
io: 16384 # IO操作缓冲 以字节为单位这里设置为16 KB
error:
include-exception: true
include-stacktrace: ALWAYS

View File

@ -1,7 +1,12 @@
server:
port: 8080
tomcat:
max-swallow-size: -1
undertow:
# 平替 tomcat server.tomcat.max-swallow-siz undertow该值默认为-1
# max-http-post-size: 10MB
worker-threads: 16 # 4核CPU标准配置
buffers:
websocket: 8192 # WebSocket缓冲 以字节为单位这里设置为8 KB
io: 16384 # IO操作缓冲 以字节为单位这里设置为16 KB
error:
include-exception: true
include-stacktrace: ALWAYS