上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 24 下一页
摘要: 解决获取请求参数的乱码问题,可以使用SpringMVC提供的编码过滤器CharacterEncodingFilter,但是 必须在web.xml中进行注册 <!--配置springMVC的编码过滤器--> <filter> <filter-name>CharacterEncodingFilter</ 阅读全文
posted @ 2022-10-18 20:46 93丶Fss 阅读(16) 评论(0) 推荐(0)
摘要: 1、通过ServletAPI获取 将HttpServletRequest作为控制器方法的形参,此时HttpServletRequest类型的参数表示封装了当前请 求的请求报文的对象 @RequestMapping("/testParam") public String testParam(HttpS 阅读全文
posted @ 2022-10-18 20:46 93丶Fss 阅读(82) 评论(0) 推荐(0)
摘要: 8、SpringMVC支持路径中的占位符(重点) 原始方式:/deleteUser?id=1 rest方式:/deleteUser/1 SpringMVC路径中的占位符常用于RESTful风格中,当请求路径中将某些数据通过路径的方式传输到服 务器中,就可以在相应的@RequestMapping注解的 阅读全文
posted @ 2022-10-18 20:41 93丶Fss 阅读(101) 评论(0) 推荐(0)
摘要: 7、SpringMVC支持ant风格的路径 ?:表示任意的单个字符 *:表示任意的0个或多个字符 **:表示任意的一层或多层目录 注意:在使用**时,只能使用/**/xxx的方式 阅读全文
posted @ 2022-10-18 20:41 93丶Fss 阅读(26) 评论(0) 推荐(0)
摘要: 1、@RequestMapping注解的功能 、从注解名称上我们可以看到,@RequestMapping注解的作用就是将请求和处理请求的控制器方法关联 起来,建立映射关系。 SpringMVC 接收到指定的请求,就会来找到在映射关系中对应的控制器方法来处理这个请求。 @RequestMapping注 阅读全文
posted @ 2022-10-18 20:40 93丶Fss 阅读(55) 评论(0) 推荐(0)
摘要: 引入依赖 <dependencies> <!-- SpringMVC --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>5.3.1</vers 阅读全文
posted @ 2022-10-18 20:32 93丶Fss 阅读(158) 评论(0) 推荐(0)
摘要: Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Tue Mar 28 22:25:43 CST 2017 There wa 阅读全文
posted @ 2022-10-18 16:35 93丶Fss 阅读(862) 评论(0) 推荐(0)
摘要: 1、分页插件使用步骤 a>添加依赖 <!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper --> <dependency> <groupId>com.github.pagehelper</groupId> < 阅读全文
posted @ 2022-10-18 11:08 93丶Fss 阅读(89) 评论(0) 推荐(0)
摘要: @Test public void testMBG() throws IOException { InputStream is = Resources.getResourceAsStream("mybatis-config.xml"); SqlSession sqlSession = new Sql 阅读全文
posted @ 2022-10-18 11:06 93丶Fss 阅读(43) 评论(0) 推荐(0)
摘要: 1、创建逆向工程的步骤 a>添加依赖和插件 <!-- 依赖MyBatis核心包 --> <dependencies> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.5.7 阅读全文
posted @ 2022-10-18 11:05 93丶Fss 阅读(37) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 24 下一页