上一页 1 ··· 7 8 9 10 11
摘要: 一、提交的域名称与参数名一致 @RequestMapping("/t1") public String t1(int a){ System.out.println(a); return "hello"; } 二、提交的域名称与参数名不一致(使用RequestParam注解) @RequestMapp 阅读全文
posted @ 2022-03-10 20:04 dronff 阅读(42) 评论(0) 推荐(0)
摘要: 方式一: 用springmvc的视图解析器 //返回字符串的话 return "/index.php"; return "/forward:/index.php"; //重定向 return "redirect:/index.php"; ModelView mv = new ModelView(); 阅读全文
posted @ 2022-03-10 19:36 dronff 阅读(210) 评论(0) 推荐(0)
摘要: 注解开发 spring-servlet简化 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context=" 阅读全文
posted @ 2022-03-10 19:18 dronff 阅读(20) 评论(0) 推荐(0)
摘要: pom文件 导入springmvc框架依赖 <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc --> <dependency> <groupId>org.springframework</groupId 阅读全文
posted @ 2022-03-10 19:13 dronff 阅读(43) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11