commit 888dcac49c4ced223c093a99159471831e98a9d2 Author: xhy Date: Wed May 28 14:05:13 2025 +0800 init commit diff --git a/HelloSpringApplication.java b/HelloSpringApplication.java new file mode 100644 index 0000000..1c50c33 --- /dev/null +++ b/HelloSpringApplication.java @@ -0,0 +1,28 @@ +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; +// } +} diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..b2303c3 --- /dev/null +++ b/pom.xml @@ -0,0 +1,41 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.1.3 + + + com.example + hello-spring + 0.0.1-SNAPSHOT + hello-spring + hello-spring + + 17 + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + +