欢迎访问我的个人网站==》 jiashubing.cn
上一页 1 2 3 4 5 6 7 ··· 40 下一页
摘要: 抛砖引玉以一下,为网络添加一个词条 使用多线程 和 Future 对象,2秒钟之后拿到结果,如果拿不到就抛出异常 future.get(2,TimeUnit.SECONDS); 标签:接口超时 阅读全文
posted @ 2023-06-21 16:21 贾树丙 阅读(38) 评论(0) 推荐(0)
摘要: 错误的写法 这种只是写 threadLocal,并没有写到 redis 里去,要想写到 redis 里 Assertion assertion = AssertionHolder.getAssertion(); assertion.getPrincipal().getAttributes().put 阅读全文
posted @ 2023-06-21 16:11 贾树丙 阅读(275) 评论(0) 推荐(0)
摘要: 核心原理就是一个类:javax.servlet.http.HttpServletRequestWrapper 一个简单的例子,当任何请求的参数里有 aaa的时候,把它的值改成 bbb 新增一个类自定义的类 CustomHttpServletRequestWrapper import javax.se 阅读全文
posted @ 2023-05-12 18:43 贾树丙 阅读(766) 评论(0) 推荐(0)
摘要: 错误写法 <form id="printPdfForm" th:action="@{/forum/topicToPdf(topicId=${topic.id})}"></form> $("#printPdfForm").submit(); <form id="printPdfForm" th:act 阅读全文
posted @ 2023-04-26 17:02 贾树丙 阅读(207) 评论(0) 推荐(0)
摘要: 直接赋值会报错Method threw 'java.lang.UnsupportedOperationException' exception. 给没有set方法的类如下赋值 public static void setFieldValue(Object obj, String fieldName, 阅读全文
posted @ 2023-04-26 16:38 贾树丙 阅读(147) 评论(0) 推荐(0)
摘要: 一般情况下,ToB企业是不会把自己的源代码给客户的,但是不同的客户又有不同的需求,每个客户都得满足,导致代码也越来越臃肿。 有一个方案,我正在用,不细说了,就讲下原理。 定义一个接口,每个客户自己实现它,写一个class 文件,但是此时不能部署到代码里了。把这个class 文件转换成16进制,存放到 阅读全文
posted @ 2023-04-26 16:27 贾树丙 阅读(58) 评论(0) 推荐(0)
摘要: IDEA 开发插件,依赖 别的jar包。刚开始搞的时候,怎么都添加不进去,导致打出来的包也不能用,还折腾了许久。现在想想也是笨。 报错 IDE Fatal Errorsjava.lang.NoClassDefFoundError: xxxx 尝试 (错误)方式一:直接把依赖包放到 本地插件 所在的同 阅读全文
posted @ 2023-04-26 16:03 贾树丙 阅读(415) 评论(0) 推荐(0)
摘要: 问题 Java FX Packager: BUILD FAILED/home/jiashubing/.cache/JetBrains/IntelliJIdea2021.1/compile-server/yht_login_client_86e0b0e5/_temp_/build.xml:43: 错误 阅读全文
posted @ 2023-04-26 15:51 贾树丙 阅读(150) 评论(0) 推荐(0)
摘要: 要求 比如:第一个文件 message_zh.properties 里有aaa=123bbb=456 第二个文件 message_en_US.properties 里有aaa=onetwothreebbb=fourfivesix 合并到一个excel里只有三列aaa 123 onetwothreeb 阅读全文
posted @ 2023-04-18 17:23 贾树丙 阅读(49) 评论(0) 推荐(0)
摘要: 自己边尝试边摸索,间距都调不了,气的呀。如有不足,请指正! spacing 相当于 margin-top margin-bottomenvBox.setSpacing(20); insets 能设置上下左右间距btn1.setOpaqueInsets(new Insets(0, 10, 0, 0)) 阅读全文
posted @ 2023-03-31 17:07 贾树丙 阅读(522) 评论(0) 推荐(0)
摘要: Button successBtn = new Button("复制url地址"); successBtn.setCursor(Cursor.HAND); successBtn.setOnAction(event -> { event.consume(); ClipboardContent cont 阅读全文
posted @ 2023-03-31 17:01 贾树丙 阅读(387) 评论(0) 推荐(0)
摘要: 1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8" /> 5 <title>Div滚动到头以后置顶</title> 6 </head> 7 <body style="height:2000px;"> 8 <div style="he 阅读全文
posted @ 2023-03-31 16:53 贾树丙 阅读(55) 评论(0) 推荐(0)
摘要: 有的时候啊,做定制化的项目,可以这么干,好用就行,别的管他呢。 String path = Thread.currentThread().getContextClassLoader().getResource("").getPath().replace("WEB-INF/classes/", "js 阅读全文
posted @ 2023-03-31 14:13 贾树丙 阅读(67) 评论(0) 推荐(0)
摘要: System.out.println(5 & (~1)); 比如,通过二进制位运算实现权限设置 newAuth.getAuthority() 为表示权限的数字,attEnum.getIndex() 指的是某一个权限的位数,代码如下 if(flag) { Long tmp = newAuth.getA 阅读全文
posted @ 2022-12-22 13:54 贾树丙 阅读(163) 评论(0) 推荐(0)
摘要: <dependency> <groupId>com.carrotsearch</groupId> <artifactId>java-sizeof</artifactId> <version>0.0.5</version> </dependency> import com.carrotsearch.s 阅读全文
posted @ 2022-12-22 10:44 贾树丙 阅读(1425) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 40 下一页