摘要:
目的 客户要求密码校验方式,用自己的认证方式。提供一种方案,在不出补丁的情况下,解决这个问题。 原理 1、本地写一个类,用客户想要的方案,实现密码校验的接口,编译成class类。2、然后把这个class类,先转换成二进制,再转换成16进制的字符串。3、将字符串写到客户的数据库里。4、重启服务,在类加 阅读全文
摘要:
一开始发现了一个安全问题,cas/status/config ,cas/statistics 接口会泄漏一些配置文件(此时不确定底层代码是否还有别的接口,其实最好的办法就是直接覆盖底层类,直接去掉这些接口,这是后话了) 刚开始想了一个简单的方案,就是直接nginx 层面,通过前缀匹配,把这些接口直接 阅读全文
摘要:
问题 postman请求 能返回图片,但是在浏览器里就返回不了,而是一堆乱码 解决 最后的解决办法, 在调用 ImageIO.write之前,加一行response.setContentType("image/jpg"); 原创文章,欢迎转载,转载请注明出处! 阅读全文
摘要:
js 数组创建 HTML 列表 <!DOCTYPE html> <html> <head> <title></title> <script src="../trd/jquery/jquery.js"></script> <script type="text/javascript"> window.o 阅读全文
摘要:
比如,jar包直接放到根目录 pom.xml 里这么配置 <dependency> <groupId>njcanc</groupId> <artifactId>njcanc</artifactId> <version>2.12</version> <scope>system</scope> <sys 阅读全文
摘要:
震惊死了,System.out.println 竟然没打印出来,别人提bug才发现。 最终发现是 grep console 插件导致的,把它关了就可以了。 关键是 grep console 过滤的内容并没有我输出的字符啊,服了,估计是插件本身的bug 阅读全文
摘要:
-am,--also-make If project list is specified, also build projects required by the list如果指定了项目列表,还可以生成列表所需的项目 -amd,--also-make-dependents If project li 阅读全文
摘要:
问题 IDEA启动maven项目,每次启动都自动去远程仓库拉jar包,很慢,还会报错,比如下面这样 [WARNING] Could not transfer metadata xxxxxx-SNAPSHOT/maven-metadata.xml from/to public xxxxx: Trans 阅读全文
摘要:
sed中''之间的单引号特殊处理需要'"'"' (两个单引号中两个双引号再最里面是目标一个单引号) 比如:sed -i 's#<a id='"'"'img_logo'"'"' href="http://www.baidu.com/"</a>##g' test.txt 双引号不需要特殊处理,直接用 阅读全文
摘要:
两个单引号表示一个单引号 比如MESSAGE_TICKET_NOT_EXIST=票根''{0}''在不存在 双引号,不需要额外处理,直接使用 比如screen.confirmation.message=单击 <a href="{0}">这里</a> 阅读全文
摘要:
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.poi.openxml4j.exceptions.Invali 阅读全文
摘要:
以下内容来源于:https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/issues/72 Delay interval predictability We have noticed a general issue with the 阅读全文
摘要:
Java中的参数为@RequestParam(value = "keys[]") String[] keys Url参数是这样的:keys%5B%5D=logo&keys%5B%5D=logoutUrl&keys%5B%5D=registerProtocolTitle&keys%5B%5D=regi 阅读全文
摘要:
不要用get,get的话有可能并发 使用 setnx ex NX :只在键不存在时,才对键进行设置操作。 SET key value NX 效果等同于 SETNX key value 。EX second :设置键的过期时间为 second 秒。 SET key value EX second 效果 阅读全文
摘要:
使用jquery的 $.get 绝对路径$.get("https://xxx.html", function (result) { $("#content").html(result); }); // 相对路径$.get("./xxx.md", function (result) { $("#con 阅读全文