![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
燃烧的梦想是信仰(坤坤)
朋友多多快乐就好,一起分享,一起解决,一起快乐
展开
-
Excelpoi导入导出--上完整代码!
excelpoi导入导出原创 2022-11-15 17:48:45 · 270 阅读 · 0 评论 -
The supplied data appears to be in the Office 2007+ XML. You are calling the part of POI that deals
excelepoi导出相关原创 2022-11-15 17:32:25 · 16378 阅读 · 1 评论 -
时间格式转换(Date转时间戳)
在开发中,经常会设计到时间的转换,因此提供常见的转时间戳来加以解释说明。 @ApiOperation("test2222") @PostMapping("test2222") public BaseResult<Boolean> test2222() { Date nowdate = new Date(); Calendar cal1 = Calendar.getInstance(); cal1.setTime(nowdate原创 2021-09-22 15:58:14 · 5177 阅读 · 0 评论 -
nativeQuery = true的使用
当sql文件中,存在nativeQuery = true时,是可以执行原生sql语句。所谓原生sql,也就是说这段sql拷贝到数据库中,然后把参数值给一下就能运行了,比如: @Query(value = "SELECT * FROM camera_info where delete_flag='0' and region_code=?1", nativeQuery = true) List<Camera> findByRegionCode(String regionCode)原创 2021-09-22 14:58:16 · 631 阅读 · 0 评论 -
Failed to convert value of type ‘java.lang.String‘ to required type ‘java.util.Date‘;问题解决
在我使用时间格式的Date传递参数时:会出现以下错误:- Resolved [org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.util.Date'; nested exception is org.springframework.core.conv原创 2021-09-15 11:13:54 · 808 阅读 · 0 评论 -
JDB1.8的新特性--集合遍历---forEach
1.在之前的jdk1.7中。集合遍历主要有以下方法:@Test public void test4(){ ArrayList<Object> list = new ArrayList<>(); list.add("aaa"); list.add("bbb"); list.add("ccc"); //for循环 for (int i=0;i< list.size(原创 2021-09-09 10:01:46 · 272 阅读 · 0 评论 -
BigDecimal.ROUND_HALF_UP的四舍五入使用(1/3转换成33%)
public static void main(String[] args) { double a = 1; double b = 3; double cc = a / b; System.out.println("运算结果是-----" + cc); BigDecimal dd = new BigDecimal(cc); System.out.println("BigDecimal对象生成的-----"...原创 2021-09-06 17:28:13 · 353 阅读 · 0 评论 -
请求传递head,body,利用map,jsonobject遍历获取key,value
@ApiOperation("test333ces") @RequestMapping("test333") public void test222(@RequestBody String str) { Map data = (Map) JSON.parse(str); Object body = data.get("body"); Object head = data.get("head"); JSONObject js..原创 2021-09-01 15:11:47 · 295 阅读 · 0 评论