package com.example.hellospring; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.RegistrationBean; import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; @SpringBootApplication @ServletComponentScan("com.example.hellospring") public class HelloSpringApplication { public static void main(String[] args) { SpringApplication.run(HelloSpringApplication.class, args); } // @Bean // public FilterRegistrationBean registrationBean() { // FilterRegistrationBean b = new FilterRegistrationBean(); // b.addUrlPatterns("111", "222"); // b.addUrlPatterns(new String[]{"111", "2222"}); // b.addUrlPatterns("3333"); // return b; // } }