自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 Spring Batch “Name must be assigned for the sake of defining the execution context keys prefix“

Spring Batch "Name must be assigned for the sake of defining the execution context keys prefix"

2023-09-23 17:00:09 230

原创 Spring Boot 读取不到其他yml配置文件的值的解决方案

1.创建import org.springframework.boot.env.YamlPropertySourceLoader;import org.springframework.core.env.PropertySource;import org.springframework.core.io.support.DefaultPropertySourceFactory;import org.springframework.core.io.support.EncodedResource;pub

2021-08-30 18:15:16 1771

原创 springboot+iview 上传excel

1.controller@RestController@RequestMapping("students")//为何放在类上,是为了简化@CrossOrigin//开启crossOrigin,跨域请求被授权,否则前台无法访问public class StudentController { @Autowired private StudentMapper studentMapper;// //获取所有的学生信息 @GetMapping //路径默认是 /students,因为类上写了

2021-08-17 13:57:42 187

原创 springboot导出excel并且下载excel

pom文件安装以下jar包<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.17</version></dependency><dependency> <groupId>org.apache.poi</groupId> <arti.

2021-08-16 18:16:34 356

原创 SpringMVC 如何更新session的数据

如何更新session的数据,我通过下面一种覆盖session数据的方式达到更新session数据。一、更新之前的数据更新之前的数据如下mysql> select * from seller;+----+-------------------+----------------------+-------------------+| id | shop_name | seller_account | password |+----+-------

2020-05-28 10:23:56 2664

原创 springmvc:在一个controller如何清除本身和另一个controller的session数据

我拿一个注销卖家账户的例子来实现同时清除本身和另一个controller(卖家)的session数据。controller本身@Controller@SessionAttributes(value = { "seller" })public class SellerController{@Autowired(required = false) private HttpSession sellerSession; @GetMapping("/logout") public String lo

2020-05-26 11:02:32 493

原创 生成10个数字1-10的唯一随机数

生成随机数是开发不可缺少的技巧之一,所以一起来学习如何生成唯一随机数。下面程序全是使用个人想法以及设计思路实现的。提示:数组的长度是不可变的,集合的长度是可变的,所以用集合来存储数据public static List<Integer> list() { List<Integer> list = new ArrayList<Integer>(); //创建空集合 Random random = new Random(); int rand = 0; w

2020-05-25 13:16:52 4576

转载 @SessionAttributes 和 @SessionAttribute的区别

具体解释,请看 https://www.cnblogs.com/flydean/p/12680344.html这两个注解区别的简单总结:@SessionAttributes 是将model设置到session中去,是一个类型级别的注解,应用于类上@SessionAttribute 是从session获取之前设置到session中的数据,是一个方法级别的注解,应用于方法上。...

2020-05-21 10:01:28 196

转载 MySQL 插入含有日期的数据,差一天问题

转载:https://blog.csdn.net/love20yh/article/details/80799610

2020-04-13 14:15:16 1034

原创 Java用XSSFWorkbook实现excel简单读写

一起来学习如何用Java实现excel简单读写Java用XSSFWorkbook实现excel简单读写一、概述二、所需的jar三、XSSFWorkbook的使用方法四、源代码一、概述Apache POI是 Java 程序员用来处理 MS Office 文件的常用开源库。由 Apache 软件基金会开发,使用 Java 分布式设计或修改 Microsoft Office 文件,包含一系列类和方...

2020-03-19 10:06:53 4563 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除