随笔分类 -  springmvc

摘要:HandlerInterceptor接口给我们提供了3个方法: (1)preHandle: 在执行controller处理之前执行,返回值为boolean ,返回值为true时接着执行postHandle和afterCompletion,如果我们返回false则中断执行 (2)postHandle: 阅读全文
posted @ 2022-11-03 15:52 wiselee/ 阅读(166) 评论(0) 推荐(0) 编辑
摘要:文件的下载功能 @RequestMapping("/testDown")public ResponseEntity<byte[]> testResponseEntity(HttpSession session) throws IOException { //获取ServletContext对象 Se 阅读全文
posted @ 2022-04-26 17:55 wiselee/ 阅读(140) 评论(0) 推荐(0) 编辑
摘要:创建 maven工程 在pom.xml引入依赖: <dependencies> <!-- SpringMVC --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> 阅读全文
posted @ 2022-03-31 22:16 wiselee/ 阅读(26) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示