Commit 25932961 authored by zengtianlai3's avatar zengtianlai3

2.3.4 代码质量:日志记录:使用系统输出流

parent f1838a95
package iot.sixiang.license.xss; package iot.sixiang.license.xss;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
...@@ -11,12 +12,13 @@ import org.springframework.context.annotation.DependsOn; ...@@ -11,12 +12,13 @@ import org.springframework.context.annotation.DependsOn;
* @Description * @Description
*/ */
@Configuration @Configuration
@Slf4j
public class XSSFilterConfig { public class XSSFilterConfig {
@Bean @Bean
@DependsOn("xssFilter") @DependsOn("xssFilter")
public FilterRegistrationBean filterRegistrationBean() { public FilterRegistrationBean filterRegistrationBean() {
System.out.println("===================filterRegistrationBean"); log.info("===================filterRegistrationBean");
FilterRegistrationBean registration = new FilterRegistrationBean(); FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(new XssFilter()); registration.setFilter(new XssFilter());
registration.addUrlPatterns("/*"); registration.addUrlPatterns("/*");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment