XssException
,可针对此异常定制全局异常处理<dependency>
<groupId>org.gy.framework</groupId>
<artifactId>spring-base-xss</artifactId>
<version>${project.version}</version>
</dependency>
@EnableXss
注解,启动Xss检查RestController
或者Controller
标注的类进行xss校验@Valid
或者@Validated
注解才会进行校验//check设置false,跳过xss检查,trim设置true,进行去空格处理
@XssCheck(check = false, trim = true)
private String name;