init commit
This commit is contained in:
commit
888dcac49c
28
HelloSpringApplication.java
Normal file
28
HelloSpringApplication.java
Normal file
@ -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;
|
||||
// }
|
||||
}
|
||||
41
pom.xml
Normal file
41
pom.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.1.3</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>hello-spring</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>hello-spring</name>
|
||||
<description>hello-spring</description>
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
Loading…
x
Reference in New Issue
Block a user