摘要: 创建票对象 /** * projectName: testSpring * * @author: * time: 2022/8/20 23:04 * description: 票对象,这里实现Runnable方法来重写Run方法 */public class Ticket implements Ru 阅读全文
posted @ 2022-08-20 23:13 黄大虾 阅读(60) 评论(0) 推荐(0) 编辑
摘要: <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>4.3.6.RELEASE</version> </dependency> <dependency> < 阅读全文
posted @ 2022-08-18 22:52 黄大虾 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 1、设置 ContentType response.setContentType("application/x-download"); 2、设置文件名,并指定编码格式 fileName = URLEncoder.encode("浏览器要显示的文件名", "UTF-8"); response.setC 阅读全文
posted @ 2022-08-18 00:05 黄大虾 阅读(14519) 评论(0) 推荐(0) 编辑
摘要: package com.hrw.controller; import com.hrw.pojo.Result; import org.apache.tomcat.util.http.fileupload.IOUtils; import org.springframework.web.bind.ann 阅读全文
posted @ 2022-07-17 22:26 黄大虾 阅读(4518) 评论(0) 推荐(0) 编辑
摘要: 描述:存储过程就是具有名字的一段代码,用来完成一个特定的功能。创建的存储过程保存在数据库的数据词典中。 --创建一个名为GreetWorld的存储过程,拼接两个值 CREATE PROCEDURE GreetWorld() SELECT CONCAT(@gretting,'world');--设置其 阅读全文
posted @ 2022-06-05 20:09 黄大虾 阅读(133) 评论(0) 推荐(0) 编辑
摘要: @RestControllerAdvice //控制器增强 public class GlobalException { //捕捉sql类的异常,可以改为想要捕捉的任何异常 @ExceptionHandler(SQLException.class) public RespBean mySqlExce 阅读全文
posted @ 2022-06-04 20:30 黄大虾 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-05-01 20:32 黄大虾 阅读(10) 评论(0) 推荐(0) 编辑
摘要: pom依赖: <!-- web依赖--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- mysq 阅读全文
posted @ 2022-03-18 22:09 黄大虾 阅读(290) 评论(0) 推荐(0) 编辑
摘要: ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 原文地址:http://t.csdn.cn/ZD88A ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ 过滤器实际上就是对web资源进行拦截,做一些处理后再交给下一个过滤器或servlet处理通常都是用来拦截reques 阅读全文
posted @ 2022-03-02 23:18 黄大虾 阅读(403) 评论(0) 推荐(0) 编辑
摘要: 当我们执行完一条Sql语句,获取到一个 ResultSet 对象后,有时我们需要立即知道到底返回了多少个元素,但是 ResultSet 并没有提供一个 size() 方法 or length 的属性,我们可以一个一个调用 next() 去累加计算,但是我们还有更好的办法 : PreparedStat 阅读全文
posted @ 2022-02-15 17:08 黄大虾 阅读(429) 评论(0) 推荐(0) 编辑