收参方式1:基本类型收参
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.Date;
@Controller
@RequestMapping("/hello2")
public class Demo2 {
@RequestMapping("test1")
public String test1(Integer id, String name, Boolean gender, Date bitrh) {
System.out.println(id+name+gender+bitrh);
return "hello.html";
}
}
# 测试URL
http://localhost:8080/hello2/test1?id=1&name=richter&