Selaa lähdekoodia

ActivitiDataSourceConfig

chenc 3 vuotta sitten
vanhempi
commit
dbdaf64fbe

+ 10 - 0
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/config/ActivitiDataSourceConfig.java

@@ -4,6 +4,9 @@ import com.alibaba.druid.pool.DruidDataSource;
 import org.activiti.engine.ProcessEngineConfiguration;
 import org.activiti.spring.SpringProcessEngineConfiguration;
 import org.activiti.spring.boot.AbstractProcessEngineAutoConfiguration;
+import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
+import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
+import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.jdbc.datasource.DataSourceTransactionManager;
@@ -27,6 +30,13 @@ public class ActivitiDataSourceConfig extends AbstractProcessEngineAutoConfigura
         return DruiddataSource;
     }
 
+    @Bean
+    public ConfigurableServletWebServerFactory webServerFactory() {
+        TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
+        factory.addConnectorCustomizers((TomcatConnectorCustomizer) connector -> connector.setProperty("relaxedQueryChars", "|{}[]\\"));
+        return factory;
+    }
+
     @Bean
     public PlatformTransactionManager transactionManager() {
         return new DataSourceTransactionManager(activitiDataSource());