File tree Expand file tree Collapse file tree
jodconverter-web/src/main/java/cn/keking Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import org .springframework .boot .autoconfigure .SpringBootApplication ;
55import org .springframework .context .annotation .ComponentScan ;
66import org .springframework .scheduling .annotation .EnableScheduling ;
7- import java .util .Properties ;
87
98@ SpringBootApplication
109@ EnableScheduling
1110@ ComponentScan (value = "cn.keking.*" )
1211public class FilePreviewApplication {
1312 public static void main (String [] args ) {
14- Properties properties = System .getProperties ();
15- System .out .println (properties .get ("user.dir" ));
1613 SpringApplication .run (FilePreviewApplication .class , args );
1714 }
1815}
Original file line number Diff line number Diff line change 1+ package cn .keking .config ;
2+
3+ import org .springframework .context .annotation .Bean ;
4+ import org .springframework .context .annotation .Configuration ;
5+
6+ /**
7+ * @author chenjh
8+ * @since 2020/5/18 13:41
9+ */
10+ @ Configuration
11+ public class RFCConfig {
12+
13+ @ Bean
14+ public Boolean setRequestTargetAllow () {
15+ // RFC 7230,RFC 3986规范不允许url相关特殊字符,手动指定Tomcat url允许特殊符号, 如{}做入参,其他符号按需添加。见tomcat的HttpParser源码。
16+ System .setProperty ("tomcat.util.http.parser.HttpParser.requestTargetAllow" , "|{}" );
17+ return true ;
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments