- 博客(120)
- 资源 (2)
- 收藏
- 关注
原创 maven打包很小的问题解决方法
在项目的pom加上 org.springframework.boot spring-boot-maven-plugin org.apache.maven.plugins maven-surefire-plugin true ...
2022-01-04 20:42:08
2043
原创 java基础:i++和++i区别
@org.junit.jupiter.api.Test void demo2(){ int i=1; int j=1; System.out.println(i++);//输出1 先使用i再++ System.out.println(++j);//输出2,先++再使用j } **i++和++i从字面意思就知道,++和i谁在前先执行谁**...
2020-12-26 11:57:32
181
原创 spring 事务总结
参考视频:https://www.bilibili.com/video/BV1aC4y1p7bF/?p=5参考文档:https://www.cnblogs.com/myitnews/p/12364455.html#autoid-4-0-0事务开启 数据库会开启行锁编程式事务 DataSouceTransactionManager(数据源事务管理器)主要api:开启事务,提交事务,回滚事务声明式事务 @transaction 编程式事务封装+AOP动态代理实现常用属性:rollbackFor 默认
2020-12-03 23:43:49
186
转载 vue的v-model原理简述
https://www.jianshu.com/p/ceaab8df4e78关键词:es6 vue编译器 html模板 vue文件解析 dom元素操作 Object.defineProperty方法
2020-11-20 09:47:49
225
原创 JS事件传递
var evt = document.createEvent("MouseEvents"); evt.initEvent("click", true, true); document.getElementById("submit_btn").dispatchEvent(evt);
2020-11-17 15:42:58
109
转载 layui提交(ajax方式)checkbox多个复选框值(数组)到后台用数组接收
https://blog.youkuaiyun.com/qq_27579471/article/details/102528337
2020-11-14 13:47:31
530
原创 springMvc接收数组
ajax traditional: true, //是否使用传统的方式浅层序列化,若有数组参数或对象参数需要设置true!!!$.ajax({ type: "POST", url: url, data: data.field, traditional: true, //是否使用传统的方式浅层序列化,若有数组参数或对象参数需要设置true!!!!!! dataType:
2020-11-14 13:46:57
294
原创 springMvc接收参数格式【属性.属性】,级联绑定到实体
<div class="layui-form-item"> <div class="layui-inline"> <label class="layui-form-label">客户姓名</label> <div class="layui-input-block">
2020-11-07 11:06:21
180
原创 js事件传递
var evt = document.createEvent("MouseEvents"); evt.initEvent("click", true, true); //注册事件document.getElementById("hello").dispatchEvent(evt); //触发dom元素事件<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title>he
2020-11-06 14:46:42
226
转载 mysql索引类型:FULLTEXT、NORMAL、SPATIAL、UNIQUE的详细介绍(转)
https://www.cnblogs.com/zhenghengbin/p/11908268.html
2020-11-05 23:48:39
257
原创 MyBatis<if>标签判断字符串相等写法
mybatis 映射文件中,if标签判断字符串相等,两种方式:因为mybatis映射文件,是使用的ognl表达式,所以在判断字符串sex变量是否是字符串Y的时候,1.<if test="sex=='Y'.toString()"><if test = 'sex== "Y"'>注意:不能使用and 1=1因为mybatis会把’Y’解析为字符,java是强类型语言,所以不能这样写。...
2020-11-02 16:58:35
509
1
原创 SQL中join连接查询时条件放在on后与where后的区别
https://www.cnblogs.com/shamo89/p/11065172.htmlleft join right join 条件放在where后会失效
2020-10-24 15:24:28
122
原创 tk.mybatis 使用Example构建复杂查询条件and(or)
sqlWHERE ( user_name = ? OR police_no = ? OR real_name = ?) AND (department_id = ?)代码Example e = new Example(User.class); Example.Criteria c = e.createCriteria(); //关键字查询部分 String keyword = pageReq.getKeyword();
2020-10-16 16:18:20
2794
原创 layui table不分页,全部展示
table.render({elem: '#' + EnterpriseInfoDetail.mainPeopleTable.id,page: false , //是否开启分页cols: EnterpriseInfoDetail.mainPeopleTable.columns,data:JSON.parse($("#employeesId").text()),limit: Number.MAX_VALUE // 数据表格默认全部显示});...
2020-10-13 11:35:42
7723
转载 uniapp H5页面使用uni.request跨域问题
https://blog.youkuaiyun.com/sayyy/article/details/106269732
2020-10-11 23:15:31
1071
转载 MySQL limit 性能分析
https://blog.youkuaiyun.com/yueloveme/article/details/95059470
2020-09-30 16:40:58
109
原创 @datetimeformat和@jsonformat
@jsonformat,阿里的jackson提供的注解,作用是【数据库–>java】的时间类型的格式化@datetimeformat Spring提供的注解,作用是【前端–>后端】时间类型数据的格式化详情参考:https://www.cnblogs.com/mracale/p/9828346.html...
2020-09-27 11:21:51
126
原创 下载文件时HttpServletResponse设置响应头的Content-Disposition属性
Content-Disposition属性有两种类型inline :将文件内容直接显示在页面attachment:弹出对话框让用户下载//让浏览器收到这份资源的时候, 以下载的方式提醒用户,而不是直接展示 resp.setHeader("Content-Disposition", "attachment; filename=bb.txt");//下载的文件直接在浏览器打开展示在页面 resp.setHeader("Content-Disposition", "inline; filename
2020-09-21 23:20:25
1238
原创 SpringBoot 集成MyBatis 中的@MapperScan注解作用
扫描指定路径的接口,生成代理对象https://blog.youkuaiyun.com/f45056231p/article/details/83817740
2020-09-17 22:38:01
1388
转载 lombok——@EqualsAndHashCode(callSuper = true)注解的使用
https://blog.youkuaiyun.com/qq_42888567/article/details/105145024?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-
2020-09-07 10:22:39
316
原创 Thymeleaf语法详解-字符串操作
https://blog.youkuaiyun.com/fangguozi/article/details/87911921
2020-08-25 10:44:11
432
原创 SpringBoot 处理前台字符串日期自动转换成后台date类型的三种办法
https://www.cnblogs.com/codingmode/p/12156249.html
2020-08-21 15:32:01
540
原创 HTML中Thymeleaf用法
导入头部定义循环 判断 定义html网页部分导入html网页<th:block th:include="/views/usermanager/yongqidizhiSelector :: yqdz"></th:block>
2020-08-18 22:37:05
2467
原创 js自定义回调函数
(参考)https://blog.youkuaiyun.com/undericon/article/details/81188923#commentBox官方定义:A callback is a function that is passed as an argument to another function and is executed after its parent function has completed(回调函数作为参数传递给另一个函数,并在父函数完成后执行。)函数a有一个参数,这个
2020-08-17 23:31:42
1261
转载 RedisTemplate之opsForValue使用说明
https://blog.youkuaiyun.com/qq_25135655/article/details/80357137
2020-08-17 22:18:59
328
原创 RocketMQ官方用户手册和github地址
https://github.com/apache/rocketmq/blob/master/docs/cn/architecture.md
2020-08-16 21:17:10
938
原创 spring boot 中@Mapper和@Repository的区别
https://www.cnblogs.com/yanghj/p/11580830.html两者都是spring扫描到注解自动生成实现类区别是@mapper不用配置扫描路径,可根据mapper.xml中namespace配置的路径,生成对应的实现类
2020-08-16 13:49:10
140
原创 订单业务时序图,强一致性,分布式事务MQ处理
如图,订单服务的Service层使用@Transation执行本地事务,调用库存,优惠券,支付微服务(同步调用),根据返回结果判断是否调用成功,如果有一个调用失败,向MQ发送回退消息。库存,优惠券,支付微服务监听MQ中的指定topic和Tag的消息,根据消息内容进行相应的本地事物的 回滚(MQ的消息体要包含订单id,优惠券ID,金额,下单数量等全部内容,方便其他微服务回滚操作)保证最终的订单,库存,优惠券,支付,4个微服务的事务一致性,要么一起成功,要么一起失败...
2020-08-16 13:02:57
2964
1
转载 idea中使用mybatis逆向工程和Example查询
idea中使用逆向工程https://blog.youkuaiyun.com/Urms_handsomeyu/article/details/78826430Example api https://www.jianshu.com/p/d022fbbc3f8c
2020-08-09 22:39:08
628
转载 Layui的本地存储方法-Layui.data的基本使用 操作localstorage和sessionstorage
http://www.manongjc.com/detail/11-jrxosqvtzledyab.html
2020-08-07 09:05:53
3619
原创 js给json对象添加、删除、修改属性
<script type="text/javascript"> //json对象 var json={ "firstName":"Bill" , "lastName":"Gates"}; //给json对象添加新的属性并赋值 json.sex="man"; //也可以如下添加新的属性并赋值 json["sex"]="man"; //删除json对象的firstName属性
2020-08-07 09:04:24
441
转载 浏览器cache,cookies,sessionStorage,localStorage的机制和区别
https://www.cnblogs.com/captainMforlife/p/11288424.html
2020-08-06 23:59:01
1004
原创 spring @PostConstruct注解 @PreDestroy注解
@PostConstruct修饰的方法会在构造函数之后,init()方法之前运行。@PostConstruct注解的方法可以有多个。被@PreDestroy修饰的方法会在服务器卸载Servlet(bean)的时候运行,并且只会被服务器调用一次,类似于Servlet的destroy()方法。被@PreDestroy修饰的方法会在destroy()方法之后运行,在Servlet被彻底卸载之前...
2020-08-03 17:31:20
90
原创 LoggerFactory.getLogger用法
使用指定类初始化日志对象,在日志输出的时候,可以打印出日志信息所在类如:Logger logger = LoggerFactory.getLogger(com.lz.Test.class);logger.debug(“日志信息”);将会打印出: com.lz.Test : 日志信息Logger logger = LoggerFactory.getLogger(this.getClass());logger.info方法的使用https://blog.youkuaiyun.com/halimao/articl
2020-08-03 17:23:21
924
转载 docker部署rocketMQ,双主双从
https://blog.youkuaiyun.com/weixin_43934607/article/details/102734663?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.
2020-08-03 14:36:26
549
转载 apache和Apache tomcat区别,以及tomcat和jetty比较
https://www.zhihu.com/question/37155807https://zhidao.baidu.com/question/757374436471159524.html
2020-08-02 16:40:29
197
实战流程---网络爬虫爬取用户数据和文章数据存到数据库流程
2020-03-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人