- 博客(51)
- 收藏
- 关注
原创 Taro+vue微信小程序根据字符串生成二维码图片,点击弹出图片,长按保存(可用!!!)
Taro+vue微信小程序根据字符串生成二维码图片,点击弹出图片,长按保存(可用!!!)
2023-03-23 15:11:41
3080
原创 Windows和Linux上使用Prometheus+Grafana监控Springboot
Windows和Linux上使用Prometheus+Grafana监控Springboot
2022-10-21 16:58:34
698
原创 Springboot中EasyExcel导出及校验后导入前后台功能实现
Springboot中EasyExcel导出及校验后导入前后台功能实现,导入校验返回错误信息
2022-06-20 17:32:30
1804
原创 自己总结的java相关时间转换工具类
java相关时间转换工具类import org.apache.commons.lang.time.DateUtils;import org.jetbrains.annotations.NotNull;import java.text.DateFormat;import java.text.DecimalFormat;import java.text.ParseException;import java.text.SimpleDateFormat;import java.time.Local
2021-06-03 09:24:27
128
原创 springboot+vue+easychart报表导出前后台
easyChart报表导出一、后台1. 依赖2. excel对象3. 自动设置列宽的类4. controller二、前台1. 按钮2. js代码效果图:一、后台1. 依赖 <dependency> <groupId>com.alibaba</groupId> <artifactId>easyexcel</artifactId> <version>2.1.
2021-06-02 16:42:58
438
原创 单体项目前后台解决表单重复提交的幂等性问题
前后台解决幂等性问题一、前台1. main.js添加全局参数2. 在el-button标签中使用v-preventReClick二、后台1. 依赖2. 自定义锁注解3. 配置类4. 在controller方法上用@LocalLock一、前台1. main.js添加全局参数import Vue from ‘vue’// 防止重复提交指令const preventReClick = Vue.directive(‘preventReClick’, { inserted (el, binding) {
2021-06-02 09:20:45
464
原创 Android Studio运行已有项目
导入项目,打开翻墙软件下载依赖File->setting->Android SDK->SDK Tools->NDK(Side by side)项勾上,下载NDK运行项目若提示NDK版本需要更新,则点击更新keytool -importkeystore -srckeystore E:\workspace\Android\Android\key_store.keystore -destkeystore E:\workspace\Android\Android\key_store..
2021-04-07 11:20:57
1423
原创 linux上springboot程序的运行的相关命令
linux上springboot程序的运行的相关命令1. 查看进程ps -ef | grep manage-2.0.12. 杀死进程kill -s 9 325733. 进入war包所在目录cd /usr/shequ20/springboot4. 运行war包nohup java -jar manage-2.0.1.war >springboot.log 2>&1 &............
2021-04-06 16:02:49
398
原创 java从表中查询树结构的xml
java从数据库查询树结构实体类@Data@TableName("t_000_factory")@ApiModel(value="Factory对象", description="Factory对象")public class Factory implements Serializable { @TableId(value = "FactoryId") private Long FactoryId; @TableField("FactoryName")
2021-04-02 16:35:14
150
原创 算法打怪日志-2【 数组中重复的数字】
找出数组中重复的数字在一个长度为 n 的数组 nums 里的所有数字都在 0~n-1 的范围内。数组中某些数字是重复的,但不知道有几个数字重复了,也不知道每个数字重复了几次。请找出数组中任意一个重复的数字。来源:力扣示例 :输入:[2, 3, 1, 0, 2, 5, 3]输出:2 或 3 方法一: 用数组 @Test void test(){ int[] nums = {2,3,1,0,2,5,3}; int[] arr =new int[nums.l
2021-03-29 14:48:06
128
原创 MybatisPlus自动生成模板代码
MybatisPlus自动生成模板代码一、引入依赖二、自动生成代码的类三、在resource的templates包下添加模板1. controller.java.vm2. entity.java.vm3. mapper.java.vm4.mapper.xml.vm5. service.java.vm6. serviceImpl.java.vm一、引入依赖 <dependency> <groupId>com.baomidou</groupId>
2021-03-29 09:51:17
1612
1
原创 Mapper CRUD 接口
MyBatisPlus的BaseMapper中的方法们根据条件执行update操作 // 把id在ids中的所有人的年龄改成3 People peopleDemo= new People(); peopleDemo.setAge(3); peopleMapper.update(peopleDemo, new QueryWrapper<People>().in("id",ids));...
2021-03-25 16:36:59
665
原创 FullCalendar-vue demo例子
FullCalendar-vue demo例子一、 样图1. 月视图2. 周视图3. 日视图二、 依赖1. 在package.json中引入依赖2. 执行以下命令下载依赖三、代码1. demo代码2. event-utils.js一、 样图1. 月视图2. 周视图3. 日视图二、 依赖1. 在package.json中引入依赖 "dependencies": { "@fullcalendar/core": "^4.3.1", "@fullcalendar/moment":
2021-03-18 17:08:11
1556
1
原创 用tomcat启动Spingboot后页面404
用tomcat启动Spingboot后页面404检查以下三点:打包方式 <packaging>war</packaging>添加web依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <version>2.
2021-01-08 15:43:21
122
原创 Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAuto
springboot 报错 Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer报错详情java.lang.IllegalStateException: Error processing condition on org.springframework.boo
2021-01-08 14:53:14
32893
原创 elementui级联选择器数据回显出错
后台给出的数据结构应为list,由于我给了个List,又在debug时选择性眼瞎到无数次怀疑人生,太困难了鸭。
2020-11-10 18:15:08
378
1
原创 c#一些与时间相关的方法
c#一些与时间相关的方法一、返回两个时间的时间差 00:00:00二、将秒数转化为时分秒(00:00:00)三、获取两个年份之间的所有年份四、获取两个日期之间的月份(月/年)五、获取两个时间内所有的日期六、按年,月返回月的天数七、获取本月第1日到今天的日期一、返回两个时间的时间差 00:00:00public static string SecondToTimeFormat(DateTime starTime, DateTime endTime) { var ts = starTime -
2020-10-16 17:05:52
141
原创 工厂模式 + 策略模式优化if-else代码
工厂模式 + 策略模式一、创建奖金接口二、编写接口实现(策略模式)三、创建奖金工厂类(工厂模式)四、奖金使用方案Service类五、测试看了一篇设计模式文章后,做个笔记表示曾经努力过。先放个平时冗余的写法:public String getBonusPlan(Integer bonus) { if (bonus.equals(100)) { return "吃呷哺火锅"; } else if (bonus.equals(300)) { return "吃蜀大侠火
2020-10-16 16:35:37
195
3
原创 算法打怪日志-1【 两数之和】
两数之和题目: 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。(来源:力扣)示例:给定 nums = [2, 7, 11, 15], target = 9因为 nums[0] + nums[1] = 2 + 7 = 9所以返回 [0, 1]...
2020-10-15 13:19:27
89
原创 echarts点击柱状图出新的图表自适应屏幕
echarts点击柱状图出新的图表自适应屏幕未点击之前的页面:点击柱状图后的效果:解决:在data中定义屏幕高度 windowsHeight: document.documentElement.clientHeight, heightMax: 0, heightMin: 0,修改柱状图style <!-- 柱状图部分 --> <div> <el-col :span="24">
2020-09-18 16:25:45
599
原创 js获取当前月总天数的数组
// 获取当前月的所有天数的数组 mGetDate() { var date = new Date() var year = date.getFullYear() var month = date.getMonth() + 1 var d = new Date(year, month, 0) var dayCounts = d.getDate() var arr = [] for (var i = 0; i...
2020-08-20 14:55:25
644
原创 vue动态生成table的表头和表体
vue动态生成table的表头和表体页面代码<template> <div style="margin-top:400px;" class="content">损失分布</div> <div class="text item"> <el-table :data="lossTable" style="width: 100%"> <el-table-column prop
2020-08-15 16:39:18
882
原创 js时间格式转换
js时间格式转换 // 日期转化为“年-月-日”格式 dateToString(date) { var year = date.getFullYear() var month = (date.getMonth() + 1).toString() var day = date.getDate().toString() if (month.length == 1) { month = '0' + month } i
2020-07-30 16:41:19
316
原创 vue中的倒计时
vue中的倒计时 // 倒计时方法 countTime() { const that = this // 设置截止时间 // 在pc端浏览器可以这样写 var date = new Date() var now = date.getTime() // this.prePart.startTime var endDate = new Date(this.prePart.startTime) // var
2020-07-30 14:27:15
284
原创 js获取当天时间所在月、日、周
获取当天时间所在月、日、周的js方法 // 获取当天所在月、日、周 getCurrentDay() { var week // 获取当前星期baiX(0-6,0代表du星期天) // eslint-disable-next-line eqeqeq if (new Date().getDay() === 0) { week = '星期日' } // eslint-disable-next-line eqeq
2020-07-30 14:19:04
343
原创 Springboot的定时任务
springboot的定时任务一、新建一个Springboot项目二、在启动类上加上注解@EnableScheduling三、编写jobs.java一、新建一个Springboot项目Springboot项目初始化可以用到这个:http://start.spring.io二、在启动类上加上注解@EnableScheduling@SpringBootApplication@EnableScheduling // 允许支持schedulepublic class DemoApplication {
2020-06-08 15:31:22
111
原创 c#服务中线程Sleep失效问题
c#服务的方法中线程Sleep失效问题需求:控制服务中方法的执行时间,在5-10分钟内随机选择一个时间执行一次打印操作。刚开始我尝试用Sleep,结果失败了,打印操作还是会3s执行一次,代码如下:namespace ZgWeb.Service{ public class TestDataService : IHostedService { private Timer _timer1; Random _rd = new Random();
2020-05-21 10:30:53
1251
原创 Echarts堆叠条形图前后端数据交互
Echarts堆叠条形图前后端数据交互一、页面代码二、后台代码1. 创建图标对应的对象2. 在controller层模拟数据库数据先上个图:一、页面代码<template> <div class="app-container"> <!-- 柱状图部分 --> <div id="main" style="width:100%;height:600px"></div> </div></template
2020-05-15 16:31:48
871
原创 vue在列表和下拉框中显示icon图标
vue在列表和下拉框中显示icon图标一、 在项目中引入阿里云icon图标二、 在data中定义icon图标列表三、 在下拉框中显示icon图标四、 在列表中显示icon图标一、 在项目中引入阿里云icon图标进入: 阿里图标官网随便选择一个图标库选择自己想要的图标(可以搜索)5. 添加到购物车6. 进入购物车,下载代码7. 下载解压后只留以下五个文件,其他的都删了8. 把上边五个文件拷贝到项目中src的assets文件下9. 在main.js里面引入iconf
2020-05-15 15:53:12
8565
1
原创 c#公用缓存
c#公用缓存1. 创建类从数据库读数据进缓存2. 在Startup中注入公用缓存并调用方法3. 公用缓存的使用4. 公用缓存和数据库的同步5. 缓存工具类1. 创建类从数据库读数据进缓存namespace ZgWeb.DBPubic{ public class DBPublic { private readonly IClusterClient _client; private readonly CacheManager _cache;
2020-05-15 14:32:46
461
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人