改用 AbstractAnnotationConfigDispatcherServletInitializer 简化初始化
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
package com.ycjy.controller;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Controller
|
||||
public class MyController1 {
|
||||
|
||||
@RequestMapping("/m1")
|
||||
public void m1(){
|
||||
public void m1(HttpServletResponse resp) throws IOException {
|
||||
resp.getWriter().print("我是你的m1===");
|
||||
System.out.println("我是m1=====");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user