上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: /** * 建一个listTemp供循环用(注意这是类似同一人在两公司供职的情景) */ public static List<Permission> formartWholeTree(List<Permission> wholePermissions) { List<Permission> lev 阅读全文
posted @ 2020-09-19 14:59 trump2 阅读(179) 评论(0) 推荐(0)
摘要: 1.为了json只返回指定的字段,其他不需要的信息不返回,定义一个指明字段的返回类, 返回通过spring提供的beanUtil.copyProperties进行复制,为了方便list复杂,定义一个工具类 public class CopyUtil extends BeanUtils { /** * 阅读全文
posted @ 2020-09-17 19:34 trump2 阅读(337) 评论(0) 推荐(0)
摘要: 为了像django那样自动封装查询条件,我自己封装了一个生成hql的工具类.(__or条件会返回过来,需要自己再去处理) contoller类: @RestController public class FengzhuangController { @Autowired private Articl 阅读全文
posted @ 2020-09-14 23:13 trump2 阅读(304) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>javascript正则表达式</title> <!-- 注意因为正则只有非字符(没有非字符串),怎么办? 我们使用[\s\S]*?后面跟字符串起始字符来表达我们的需求 repla 阅读全文
posted @ 2020-09-13 02:24 trump2 阅读(141) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>promise</title> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <scrip 阅读全文
posted @ 2020-09-13 02:19 trump2 阅读(121) 评论(0) 推荐(0)
摘要: 方便行事,个人约定: A.只允许@ManyToOne和@OneToOne注解; B.不许配cascade,需要处理的自己写; C.使用 @NotFound(action=NotFoundAction.IGNORE)与延迟加载互斥,影响一定性能; 1.dao继承两个接口一个是JpaRepository 阅读全文
posted @ 2020-09-12 03:03 trump2 阅读(153) 评论(0) 推荐(0)
摘要: https://www.bilibili.com/video/BV1JE411V7xk?p=8 阅读全文
posted @ 2020-08-28 01:15 trump2 阅读(98) 评论(0) 推荐(0)
摘要: ***********零散知识点***********1.type(xxx) 显示xxx的类型 判断类型可以使用 type(a) == type(1)2.几种占位符 2.1 %s/d... 以百分号表示的占位符, eg: print('a is %d b is %s'%(1,'ddd')) 2.2 阅读全文
posted @ 2020-08-28 00:56 trump2 阅读(158) 评论(0) 推荐(0)
摘要: 基于以下原因,我们会用读写分离: 1.写时锁表,会影响读 2.读写的压力达到单台数据库极限,使用多台来分摊压力. 主从参见:https://www.bilibili.com/video/BV1Q4411g7s1?from=search&seid=323994097297460924 以两种方式实现读 阅读全文
posted @ 2020-06-04 19:44 trump2 阅读(1311) 评论(0) 推荐(0)
摘要: 1:mycomm.sh -> 数据库连接 #!/bin/shtest_db=testoptest="mysql -hlocalhost -uroot -ptyu!@!*T2 --default-character-set=utf8 -N "now_time=`date +%s` p_list=`$o 阅读全文
posted @ 2020-05-30 15:28 trump2 阅读(369) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 下一页