摘要: 先引入jsch依赖 <dependency> <groupId>com.jcraft</groupId> <artifactId>jsch</artifactId> <version>0.1.53</version> import java.sql.DriverManager; import jav 阅读全文
posted @ 2022-05-17 21:34 lutoux 阅读(796) 评论(0) 推荐(0)
摘要: SpringBoot提供了Retry机制, 以应对内部发出请求 得不到响应, 而导致程序执行失败的问题 基本逻辑是 ( 以 "捕捉到异常"为条件触发 - - 重试 -- 最终补偿策略 ) ##导入依赖 <!--Spring重试模块--> <dependency> <groupId>org.sprin 阅读全文
posted @ 2021-03-08 10:59 lutoux 阅读(507) 评论(1) 推荐(0)
摘要: 比如用户短时间内多次刷新页面,或app短时间多次请求新内容,可以使用redis缓解请求压力 首先自定义注解 /** * 标注在controller 进行缓存 ,其他情况不进行 */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNT 阅读全文
posted @ 2021-03-05 23:21 lutoux 阅读(350) 评论(0) 推荐(0)
摘要: >npm uninstall @vue/cli -g //先执行一遍卸载,会提示 up to date in 0.023s ,忽略 >npm config ls -l 看userconfig = "C:\\Users\\Administrator\\.npmrc"是Npm配置文件路径,删除 >whe 阅读全文
posted @ 2021-03-02 19:58 lutoux 阅读(4048) 评论(0) 推荐(0)
摘要: HttpEntity 定义了 header,body属性,重写Object toString ResponseEntity 定义了status属性 , 继承HttpEntity ,然后再增强; 内部构建BodyBuilder HeaderBuilder接口, 大多内部方法返回此接口,实现链式赋值. 阅读全文
posted @ 2021-03-01 12:03 lutoux 阅读(5139) 评论(0) 推荐(0)
摘要: 有几个特别的注意部分:修改IDE的Editor字符编码为UTF-8,阿里云模板签名保存在Properties,可能要包含中文,防止乱码,与服务器签署 的签名不匹配.发送JSON格式问题,最终发送的验证码,需要在程序中拼接好双引号,setTemplateParam("{\"code\":\"" + c 阅读全文
posted @ 2021-03-01 09:38 lutoux 阅读(1229) 评论(0) 推荐(0)
摘要: 之前一起用node.js搭建环境,今天突然vue create项目卡壳不动,但只想练小demo,找半天没找到空环境搭建方法 后来在另一网友帮助下,找到答案 这里没有使用new Vue ,使用了 mainDiv.mount("#wrapper") 进行挂载 <!DOCTYPE html> <html 阅读全文
posted @ 2021-02-27 21:19 lutoux 阅读(889) 评论(0) 推荐(0)
摘要: 主要依靠一个js文件 ,引入到content页面 $(function () { $.get("header.html",function (data) { $("#header").html(data); }); $.get("footer.html",function (data) { $("# 阅读全文
posted @ 2021-02-27 19:17 lutoux 阅读(996) 评论(0) 推荐(0)
摘要: Carlendar类实例,set方法非常灵活,可以方便地设定一个时间。 Calendar calendar = Calendar.getInstance();//分别是 年 月日 时分秒 ,月份是从0月开始,12月就是11 calendar.set(2020,0,1,18,24,05); Date 阅读全文
posted @ 2021-02-23 15:16 lutoux 阅读(179) 评论(0) 推荐(0)