1.背景 项目使用了 Spring + shiro 实现 权限控制, 使用AOP 对 每个 Controller 进行 log 记录时,需要从 shiro 中 获取 username字段, 问题就这样出现了. UserDO userDO = (UserDO) SecurityUtils.getSubject().getPrincipal(); 出现 java.lang.ClassCastException: com.xxx.common.dal.dataobject.UserDO cannot…
  问题描述 项目使用Elasticsearch作为搜索引擎,Kibana用来进行可视化操作,Kibana中有Dev tool可供用户使用REST ful API 访问Elasticsearch,在一次查询中,搜索结果与预期不符,预期是得到所有other_edu_tags字段包含“Editor”字符串的文档,但是实际结果是得到了该索引下的所有文档. 如图:     原因分析 1.一开始判断是搜索条件有问题,但是这个搜索条件之前是可以正确得到预期结果的,只是这次搜索的字段和内容不一样,初步判断不是…
Atitit s2018.5 s5  doc list on com pc.docx  Acc  112237553.docx Acc baidu netdisk.docx Acc csdn 18821766710   attilax main num.docx Atiitt put post 工具  开发工具dev tool test.docx Atiitt 腾讯图像分类相册管家.docx Atitit   nfs server.docx Atitit   模块的鉴别方法 或许可以通过关系图连…
Chrome dev tool has "Pasue on caught exceptions" which is useful when there is expection throw. It pause the excution and you can check "Scope" to see all the local variable.…
kinaba Dev Tool中对es(elasticSearch)进行增删改查 一.查询操作 查询语句基本语法 以下语句类似于mysql的: select * from  xxx.yyy.topic  where 条件1,条件2,...条件N GET xxx.yyy.topic/logs/_search { "query": { "bool": { 这里面是限制条件,不写则查所有数据 可以包含单个或多个限制条件 } } } select * from xxx.yy…
方式一(OK) 模块A引入模块B ,但是模块B的bean一直注入不进来 原因: A模块的Application是在com.xx.xx包下,那么势必只能扫描到这个包下的bean, B模块的Application是在com.xxx包下,那么在A引入B以后就A就肯定扫描不到他上层包的bean 解决办法: 1.将A模块和B模块的Application置于相同路径下,例如com.xx下(只是名称一致,不是真的在同一包下) 2.使用@ComponentScan(value="com.xx")注解,…
在使用springboo的时候,遇到一个问题,想在tool类中注入一个bean,一直失败,翻了下源码,是因为工具类的初始化方法为反射class调用newInstance方法,详见 http://www.cnblogs.com/xiaoQLu/p/7292971.html 那还有没有其他方法实现呢,请教了组内的大神,丢了如下一段代码我 @Configuration public class WebAppConfigTest extends WebMvcConfigurerAdapter { @Ov…
)开机启动挂载配置 [root@pldb2 ~]# vim /etc/fstab You have new mail in /var/spool/mail/root [root@pldb2 ~]# more /etc/fstab # # /etc/fstab # Created by anaconda on Wed Jan 15 04:45:47 2014 # # Accessible filesystems, by reference, are maintained under '/dev/d…
数据库中有一个bigint类型数据,对应java后台类型为Long型,在某个查询页面中碰到了问题:页面上显示的数据和数据库中的数据不一致.例如数据库中存储的是:1475797674679549851,显示出来却成了1475797674679550000,后面几位全变成了0,精度丢失了. 1. 原因 这是因为Javascript中数字的精度是有限的,bigint类型的的数字超出了Javascript的处理范围.JS 遵循 IEEE 754 规范,采用双精度存储(double precision),…
Using the New Device Emulation Interface The Device Emulation interface changed a bit with the newer version of Chrome Dev Tools. Here are the instructions for emulating the required device characteristics in the new UI: Select Edit from the Responsi…