- 博客(45)
- 收藏
- 关注
原创 前后端分离springboot 拦截器和跨域问题
package com.wms.controller;import cn.hutool.extra.spring.SpringUtil;import com.wms.exeception.MyException;import com.wms.utils.getUserConfig;import com.wms.vo.ResultCode;import com.wms.vo.ResultVo;import com.wms.vo.userVo;import org.springframework
2022-05-31 18:41:59
618
原创 【无标题】Callable的实现多线程异步执行任务
1.利用线程池 public static void main(String[] args) { GlobalConfig globalConfig = new GlobalConfig(); ThreadPoolTaskExecutor threadPoolTaskExecutor = globalConfig.defaultThreadPool(); Future<Integer> future1 = threadPoolTaskExec
2022-05-18 14:34:14
486
原创 【无标题】读取XML文件返回List<map>
创建xml<?xml version="1.0" encoding="UTF-8" ?><!--<?xml version="1.0" encoding="UTF-8" ?>以上内容就是xml文件的声明,version="1.0" version表示xml的版本encoding="utf-8" encoding表示xml文件本身的编码--><books> <book sn="1"> <codeTyp
2022-05-16 15:13:39
1000
原创 List<SchzVo>集合对象根据对象中的多属性进行分组响应Map<String, List<SchzVo>>
List<SchzVo> schzVoList = new ArrayList<>(); Map<String, Object> totalMap = new HashMap<>(); //按公司,部门,组进行分组,统计每组每天的合计 Map<String, List<SchzVo>> listMap = schzVoList.stream().collect(Collectors.groupin.
2022-04-11 16:58:10
205
原创 SpringBoot集成websocket+Rabbitmq实现前端订阅mq消息
websocket整合rabbitMQ——实现消息推送一、实现功能:当前页面点击请求后,另一个页面立即收到一条消息,用springboot+websocket+rabbitMQ实现。二、java代码:1、先在pom里导入需要的坐标复制代码org.springframework.bootspring-boot-starter-amqp2.1.4.RELEASE <!--webSocket--> <dependency> <gro
2022-04-06 16:53:54
4809
原创 StringRedisTemplate的使用
StringRedisTemplate的使用redisTemplate.opsForValue();//操作字符串redisTemplate.opsForHash();//操作hashredisTemplate.opsForList();//操作listredisTemplate.opsForSet();//操作setredisTemplate.opsForZSet();//操作有序set//redis操作Hash String img = (String) stringRedisTem
2022-04-06 10:26:06
1176
原创 sql server 范围时间查询
<select id="getFpw" resultType="java.util.Map"> SELECT ISNULL(num,0)as num ,rTime FROM fpw WHERE rTime BETWEEN CONVERT(varchar(100), #{startDay}, 20) and CONVERT(varchar(100), #{endDay}, 20) and rFirm = #{firm} and rBumen =#{bumen} AND r..
2022-04-06 10:17:33
1513
原创 SpringBoot集成solr定时任务从数据库数据更新到sorl数据
1.引入jar <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <dependency> <groupId>org
2022-04-06 10:12:24
426
原创 springBoot-rabbitmq-(二)
import com.example.rabbitmqdemo.Service.RabbitmqService;import com.rabbitmq.client.Channel;import com.rabbitmq.client.Connection;import com.rabbitmq.client.ConnectionFactory;import org.springframework.amqp.rabbit.core.RabbitTemplate;import org.spring.
2022-04-06 09:00:48
102
原创 SpringBoot集成RabbitMQ部署和使用
1.pom文件引入jar <!--rabbitmq--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-amqp</artifactId> </dependency> <dependency
2022-04-03 16:36:13
2661
原创 自定义注解实现AOP日志记录
1.引入jar包 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency>2.创建自定义注解@Target(ElementType.METHOD)@Retention(Retenti
2022-04-01 15:25:29
1143
原创 【无标题】范围时间拆分到数组中形成一个下标一天时间
String year = URLDecoder.decode((String) paramMap.get("year"), "UTF-8").trim(); //选择年 String month = URLDecoder.decode((String) paramMap.get("month"), "UTF-8").trim(); //选择月 String startDay = URLDecod...
2022-03-31 16:44:20
138
原创 quartz定时器
1.配置pom引入jar包 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-quartz</artifactId> <version>2.3.5.RELEASE</version> </depende
2022-03-01 23:35:52
156
原创 调用Timer来开启关闭定时任务
package com.ridkowms.modules.webpage;import java.util.Date;import java.util.Timer;import java.util.TimerTask;import java.util.concurrent.DelayQueue;public class test1 { private static boolean name=false; // private static ThreadLocal<Strin
2022-02-26 00:08:44
912
原创 时间日期往后增加一整天
if (oConvertUtils.isNotEmpty(endTime)){ Calendar calendar = new GregorianCalendar(); calendar.setTime(endTime); calendar.add(calendar.DATE,1); //把日期往后增加一天,整数 endTime = calendar.getTime(); queryWrapper.le("start_t...
2021-12-24 14:56:08
962
原创 导入Excel功能
控制层/*** 通过excel导入数据** @param request* @param response* @return/@RequestMapping(value = “/importExcel”, method = RequestMethod.POST)public Result importExcel(HttpServletRequest request, HttpServletResponse response) {return super.importExcel(reque
2021-12-22 10:32:46
1668
原创 导出Excel功能
控制层/*** 导出excel** @param response* @param v2DespatchWebPageDispatchListex*/@RequestMapping(value = “/exportXls”)public void exportXls(HttpServletResponse response, V2DespatchWebPageDispatchListEX v2DespatchWebPageDispatchListex) { v2DespatchWebpa
2021-12-22 09:26:33
182
原创 MySQL 删除重复的数据保留一条数据
delete from v2_despatch_webpagedriverwhere id in (select id from(select id from v2_despatch_webpagedriver where driver_name in(select driver_name from v2_despatch_webpagedrivergroup by driver_name having count(driver_name)>1)and id not in(select mi
2021-12-15 10:49:06
665
原创 解决MySQL插入生僻字报错问题
执行命令alter table v2_despatch_webpagedriver convert to character set utf8mb4;
2021-12-15 09:35:02
1180
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人