mirror of https://github.com/jeecgboot/jeecg-boot
Merge pull request #5716 from EightMonth/springboot3
升级fastjson至2.0.43,替换tomcat为undertowpull/5765/head
commit
b5fd5fe782
|
@ -53,6 +53,16 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- websocket -->
|
<!-- websocket -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -413,7 +413,7 @@ public class oConvertUtils {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] childs = childArray.toArray(new String[]{});
|
String[] childs = (String[]) childArray.toArray();
|
||||||
for (String v : childs) {
|
for (String v : childs) {
|
||||||
if (!isIn(v, all)) {
|
if (!isIn(v, all)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -15,10 +15,6 @@ import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author kezhijie@wuhandsj.com
|
|
||||||
* @date 2023/11/2 14:19
|
|
||||||
*/
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class Swagger3Config implements WebMvcConfigurer {
|
public class Swagger3Config implements WebMvcConfigurer {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
package org.jeecg.config;
|
||||||
|
|
||||||
|
import io.undertow.server.DefaultByteBufferPool;
|
||||||
|
import io.undertow.websockets.jsr.WebSocketDeploymentInfo;
|
||||||
|
import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
|
||||||
|
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class UndertowCustomizer implements WebServerFactoryCustomizer<UndertowServletWebServerFactory> {
|
||||||
|
@Override
|
||||||
|
public void customize(UndertowServletWebServerFactory factory) {
|
||||||
|
factory.addDeploymentInfoCustomizers(deploymentInfo -> {
|
||||||
|
WebSocketDeploymentInfo webSocketDeploymentInfo = new WebSocketDeploymentInfo();
|
||||||
|
webSocketDeploymentInfo.setBuffers(new DefaultByteBufferPool(false, 1024));
|
||||||
|
deploymentInfo.addServletContextAttribute("io.undertow.websockets.jsr.WebSocketDeploymentInfo", webSocketDeploymentInfo);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,33 +1,33 @@
|
||||||
package org.jeecg.config.init;
|
//package org.jeecg.config.init;
|
||||||
|
//
|
||||||
import org.apache.catalina.Context;
|
//import org.apache.catalina.Context;
|
||||||
import org.apache.tomcat.util.scan.StandardJarScanner;
|
//import org.apache.tomcat.util.scan.StandardJarScanner;
|
||||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
//import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||||
import org.springframework.context.annotation.Bean;
|
//import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
//import org.springframework.context.annotation.Configuration;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @Description: TomcatFactoryConfig
|
// * @Description: TomcatFactoryConfig
|
||||||
* @author: scott
|
// * @author: scott
|
||||||
* @date: 2021年01月25日 11:40
|
// * @date: 2021年01月25日 11:40
|
||||||
*/
|
// */
|
||||||
@Configuration
|
//@Configuration
|
||||||
public class TomcatFactoryConfig {
|
//public class TomcatFactoryConfig {
|
||||||
/**
|
// /**
|
||||||
* tomcat-embed-jasper引用后提示jar找不到的问题
|
// * tomcat-embed-jasper引用后提示jar找不到的问题
|
||||||
*/
|
// */
|
||||||
@Bean
|
// @Bean
|
||||||
public TomcatServletWebServerFactory tomcatFactory() {
|
// public TomcatServletWebServerFactory tomcatFactory() {
|
||||||
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory() {
|
// TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory() {
|
||||||
@Override
|
// @Override
|
||||||
protected void postProcessContext(Context context) {
|
// protected void postProcessContext(Context context) {
|
||||||
((StandardJarScanner) context.getJarScanner()).setScanManifest(false);
|
// ((StandardJarScanner) context.getJarScanner()).setScanManifest(false);
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
factory.addConnectorCustomizers(connector -> {
|
// factory.addConnectorCustomizers(connector -> {
|
||||||
connector.setProperty("relaxedPathChars", "[]{}");
|
// connector.setProperty("relaxedPathChars", "[]{}");
|
||||||
connector.setProperty("relaxedQueryChars", "[]{}");
|
// connector.setProperty("relaxedQueryChars", "[]{}");
|
||||||
});
|
// });
|
||||||
return factory;
|
// return factory;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
server:
|
server:
|
||||||
port: 8080
|
port: 8080
|
||||||
tomcat:
|
undertow:
|
||||||
max-swallow-size: -1
|
# 平替 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:
|
error:
|
||||||
include-exception: true
|
include-exception: true
|
||||||
include-stacktrace: ALWAYS
|
include-stacktrace: ALWAYS
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
server:
|
server:
|
||||||
port: 8080
|
port: 8080
|
||||||
tomcat:
|
undertow:
|
||||||
max-swallow-size: -1
|
# 平替 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:
|
error:
|
||||||
include-exception: true
|
include-exception: true
|
||||||
include-stacktrace: ALWAYS
|
include-stacktrace: ALWAYS
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
server:
|
server:
|
||||||
port: 8080
|
port: 8080
|
||||||
tomcat:
|
undertow:
|
||||||
max-swallow-size: -1
|
# 平替 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:
|
error:
|
||||||
include-exception: true
|
include-exception: true
|
||||||
include-stacktrace: ALWAYS
|
include-stacktrace: ALWAYS
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -38,7 +38,7 @@
|
||||||
<alibaba.nacos.version>2.0.4</alibaba.nacos.version>
|
<alibaba.nacos.version>2.0.4</alibaba.nacos.version>
|
||||||
|
|
||||||
<xxl-job-core.version>2.2.0</xxl-job-core.version>
|
<xxl-job-core.version>2.2.0</xxl-job-core.version>
|
||||||
<fastjson.version>1.2.83</fastjson.version>
|
<fastjson.version>2.0.43</fastjson.version>
|
||||||
<pegdown.version>1.6.0</pegdown.version>
|
<pegdown.version>1.6.0</pegdown.version>
|
||||||
<knife4j-spring-boot-starter.version>4.3.0</knife4j-spring-boot-starter.version>
|
<knife4j-spring-boot-starter.version>4.3.0</knife4j-spring-boot-starter.version>
|
||||||
<knife4j-spring-ui.version>2.0.9</knife4j-spring-ui.version>
|
<knife4j-spring-ui.version>2.0.9</knife4j-spring-ui.version>
|
||||||
|
|
Loading…
Reference in New Issue