修复 菜单管理-编辑-默认跳转地址 不显示内容的bug

SpringBoot 请求参数包含 [] 特殊符号 返回400状态
This commit is contained in:
zhangdaiscott 2020-12-24 22:11:07 +08:00
parent 1588db3cb4
commit be477e48ff
2 changed files with 16 additions and 3 deletions

View File

@ -294,7 +294,7 @@
this.visible = true; this.visible = true;
this.loadTree(); this.loadTree();
let fieldsVal = pick(this.model,'name','perms','permsType','component','url','sortNo','menuType','status'); let fieldsVal = pick(this.model,'name','perms','permsType','component','redirect','url','sortNo','menuType','status');
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(fieldsVal) this.form.setFieldsValue(fieldsVal)
}); });
@ -427,4 +427,4 @@
<style scoped> <style scoped>
</style> </style>

View File

@ -2,11 +2,13 @@ package org.jeecg;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.catalina.Context; import org.apache.catalina.Context;
import org.apache.catalina.connector.Connector;
import org.apache.tomcat.util.scan.StandardJarScanner; import org.apache.tomcat.util.scan.StandardJarScanner;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
@ -48,11 +50,22 @@ public class JeecgSystemApplication extends SpringBootServletInitializer {
*/ */
@Bean @Bean
public TomcatServletWebServerFactory tomcatFactory() { public TomcatServletWebServerFactory tomcatFactory() {
return 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(new TomcatConnectorCustomizer() {
@Override
public void customize(Connector connector) {
connector.setProperty("relaxedPathChars", "\"<>[\\]^`{|}");
connector.setProperty("relaxedQueryChars", "\"<>[\\]^`{|}");
}
});
return factory;
} }
} }