提交 20565c34 编写于 作者: 如梦技术's avatar 如梦技术 🐛

mica-xss 优化,避免 xss 关闭时被类扫描,导致 bean 找不到异常。

上级 3c07a4aa
......@@ -22,6 +22,7 @@ import net.dreamlu.mica.auto.annotation.AutoIgnore;
import net.dreamlu.mica.core.utils.StringPool;
import net.dreamlu.mica.xss.config.MicaXssProperties;
import net.dreamlu.mica.xss.utils.XssUtil;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.InitBinder;
......@@ -35,6 +36,12 @@ import java.beans.PropertyEditorSupport;
*/
@AutoIgnore
@ControllerAdvice
@ConditionalOnProperty(
prefix = MicaXssProperties.PREFIX,
name = "enabled",
havingValue = "true",
matchIfMissing = true
)
@RequiredArgsConstructor
public class FormXssClean {
private final MicaXssProperties properties;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册