随笔分类 -  java

摘要:版本:(参考:https://cloud.tencent.com/developer/article/2153563) jdk java version "1.8.0_31" (环境变量配置自行配置忽略) zookeeper : 3.9.3 kafka : kafka_2.12-3.9.1 zook 阅读全文
posted @ 2025-08-15 14:28 SimpleSmile 阅读(46) 评论(0) 推荐(0)
摘要:工作的时候突然想到一个问题,valid运行机制。为什么直接引入包就可以了,valid运行机制。为什么直接引入包就可以了?? 启动程序的时候: classLoader.getResources("META-INF/spring.factories") ; //获取所有查看有这个spring.facto 阅读全文
posted @ 2025-04-01 11:54 SimpleSmile 阅读(43) 评论(0) 推荐(0)
摘要:RestTemplate httpClientTemplate = new RestTemplate(); List<HttpMessageConverter<?>> converters = httpClientTemplate.getMessageConverters(); List<HttpM 阅读全文
posted @ 2022-02-18 15:31 SimpleSmile 阅读(562) 评论(0) 推荐(0)
摘要:需要引入的包 import org.apache.poi.hssf.usermodel.*; import org.apache.poi.ss.usermodel.HorizontalAlignment; import org.apache.poi.ss.usermodel.VerticalAlig 阅读全文
posted @ 2022-02-09 08:50 SimpleSmile 阅读(154) 评论(0) 推荐(0)
摘要:1.加载是可以加载到的,但是只能是以流的形式存在。 2.如果要按文件进行加载,可以新建一个文件,然后以流的形式写入到新的文件中。 3.加载这个新的文件来进行处理。 阅读全文
posted @ 2022-01-17 19:36 SimpleSmile 阅读(418) 评论(0) 推荐(0)
摘要:一、linux端口被禁用,通过telnet查看。(我这里没问题) 二、排查环境参数是否一致(我这里没问题) 三、查看jdk版本原因,因为jdk1.8有的版本禁用了ssl 参阅文档:https://blog.csdn.net/weixin_38111957/article/details/805776 阅读全文
posted @ 2021-12-21 14:02 SimpleSmile 阅读(494) 评论(0) 推荐(0)
摘要:linux时间显示为:Tue Nov 30 09:33:04 CST 2021 SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US); String newStartDate = 阅读全文
posted @ 2021-11-30 09:40 SimpleSmile 阅读(304) 评论(0) 推荐(0)
摘要:测试环境springboot md5加密结果不一致 linux启动的时候 java -Dfile.encoding=utf-8 -jar xxx.jar 即可。主要是编码不一致导致。 阅读全文
posted @ 2021-11-29 17:19 SimpleSmile 阅读(482) 评论(0) 推荐(0)
摘要:这种很可能是字符集的问题,但是有时候我们不能去修改字符集 所以,可以对查询的结果加指定类型的操作 比如: select CAST(name as CHAR) as name from tab 强制将name 转换为字符串类型,来解决这样的问题。 分享使大家进步。 阅读全文
posted @ 2021-09-18 09:50 SimpleSmile 阅读(571) 评论(0) 推荐(0)
摘要:http://tools.android-studio.org/index.php/sdk 阅读全文
posted @ 2021-02-23 16:49 SimpleSmile 阅读(157) 评论(0) 推荐(0)
摘要:参考文档:https://blog.csdn.net/weixin_36995355/article/details/95754238 一、检查linux linux文件访问默认权限与umask有关,查看系统默认配置(/etc/profile)是否正常,如果是002或022就正常没有问题。 [uma 阅读全文
posted @ 2021-02-03 18:46 SimpleSmile 阅读(1380) 评论(0) 推荐(0)
摘要:参考文档:http://www.voidcn.com/article/p-kunmmetg-bgw.html DelegatingFilterProxy就是一个对于servlet filter的代理,用这个类的好处主要是通过spring容器来管理servlet filter的生命周期,还有就是如果f 阅读全文
posted @ 2021-02-03 18:03 SimpleSmile 阅读(472) 评论(0) 推荐(0)
摘要:1.查看spring security,发现会自动创建多个对象。此时需要通过排序来进行,将自己设置的配置文件提前初始化来满足 2.原因找到了。自己配置了多个config。所以造成创建了多个filter。这里一定要注意哦~~~ @EnableWebSecurity @Order(1) //排序来处理这 阅读全文
posted @ 2021-01-22 18:12 SimpleSmile 阅读(1836) 评论(0) 推荐(0)
摘要:1.依赖包 <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-core</artifactId> <version>5.5.7</version> </dependency> 2.实现代码 File file = FileUti 阅读全文
posted @ 2021-01-20 08:59 SimpleSmile 阅读(585) 评论(0) 推荐(0)
摘要:环境:windows10 ,jdk1.8,springboot <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-core</artifactId> <version>5.5.7</version></dependency> < 阅读全文
posted @ 2021-01-20 08:43 SimpleSmile 阅读(13345) 评论(0) 推荐(0)
摘要:1.问题描述: 将业务代码放在service层,执行saveOrUpdate()时,出现对象已经存在的异常。Exception in thread"main"org.hibernate.NonUniqueObjectException: a different object with the sam 阅读全文
posted @ 2021-01-06 09:52 SimpleSmile 阅读(649) 评论(0) 推荐(0)
摘要:环境:springboot 2.4.0 1.添加依赖 <dependency> <groupId>com.alicp.jetcache</groupId> <artifactId>jetcache-starter-redis</artifactId> <version>2.6.0</version> 阅读全文
posted @ 2020-12-17 15:26 SimpleSmile 阅读(1505) 评论(0) 推荐(0)
摘要:环境:springboot 2.4.0 1.添加依赖 <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-crypto</artifactId> <version>5.5.4</version> </dependency> 2.初 阅读全文
posted @ 2020-12-17 15:20 SimpleSmile 阅读(7319) 评论(0) 推荐(0)
摘要:基于sprigboot的日志模板 <?xml version="1.0" encoding="UTF-8"?> <!-- For assistance related to logback-translator or configuration --> <!-- files in general, 阅读全文
posted @ 2020-12-15 15:02 SimpleSmile 阅读(595) 评论(0) 推荐(0)
摘要:1.系统 centos 2.cp zk/conf/zoo_sample.cfg zk/conf/zoo.cfg 3.修改 zoo.cfg中 的datadir目录地址 4.zk/bin/zkServer.sh start 5.zk/bin/zkServer.sh status 提示未启动 6.查看日志 阅读全文
posted @ 2020-12-10 11:15 SimpleSmile 阅读(278) 评论(0) 推荐(0)