- 创建一个项目
-
package com.test; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.ServletComponentScan; @SpringBootApplication @ServletComponentScan//会扫描@WebServlet的类并实例化该类 public class App { public static void main(String[] args) { SpringApplication.run(App.class, args); } } package com.test; impor