01 2023 档案

摘要:1、读取本工程下的文件 @Autowired private ResourceLoader resourceLoader; Resource resource = resourceLoader.getResource("classpath:\\file\\二标段.xlsx"); EasyExcelF 阅读全文
posted @ 2023-01-29 11:19 Caesar_the_great 阅读(967) 评论(0) 推荐(0) 编辑
摘要:1、引入依赖 <dependency> <groupId>com.github.s7connector</groupId> <artifactId>s7connector</artifactId> <version>2.1</version> </dependency> 2、获取S7Connecto 阅读全文
posted @ 2023-01-29 10:45 Caesar_the_great 阅读(1564) 评论(0) 推荐(0) 编辑
摘要:1、引入依赖 <dependency> <groupId>com.github.dathlin</groupId> <artifactId>HslCommunication</artifactId> <version>3.1.1</version> </dependency> 2、使用Siemens 阅读全文
posted @ 2023-01-29 10:37 Caesar_the_great 阅读(1426) 评论(0) 推荐(0) 编辑
摘要:这篇文章介绍如何使用opc ua的方式,访问opc数据。 1、引入依赖 <!-- milo连接opc --> <dependency> <groupId>org.eclipse.milo</groupId> <artifactId>sdk-client</artifactId> <version>0 阅读全文
posted @ 2023-01-29 10:28 Caesar_the_great 阅读(4705) 评论(0) 推荐(1) 编辑
摘要:1、引入依赖 <dependency> <groupId>com.squareup.okhttp3</groupId> <artifactId>okhttp</artifactId> <version>4.10.0</version> </dependency> 2、GET请求 /** * 通过ht 阅读全文
posted @ 2023-01-27 19:09 Caesar_the_great 阅读(161) 评论(0) 推荐(0) 编辑
摘要:1、引入依赖 <dependency> <groupId>com.intelligt.modbus</groupId> <artifactId>jlibmodbus</artifactId> <!-- 版本号可依照maven仓库迭代升级 --> <version>1.2.9.7</version> 阅读全文
posted @ 2023-01-27 19:03 Caesar_the_great 阅读(544) 评论(0) 推荐(0) 编辑
摘要:一、线程池使用步骤: 1、自定义线程池 private ThreadPoolExecutor executor; /** * 初始化线程池 */ @PostConstruct private void init(){ int processors = Runtime.getRuntime().ava 阅读全文
posted @ 2023-01-22 18:40 Caesar_the_great 阅读(312) 评论(0) 推荐(0) 编辑
摘要:1、创建三个server.properties文件,修改以下核心配置: # 核心配置1:修改broker节点,0 1 2broker.id=2 # 核心配置2:修改监听端口 // 9092 9093 9094listeners=PLAINTEXT://192.168.65.60:9094 # 核心配 阅读全文
posted @ 2023-01-21 10:29 Caesar_the_great 阅读(35) 评论(0) 推荐(0) 编辑
摘要:步骤: 1、引入依赖 <dependency> <groupId>org.springframework.kafka</groupId> <artifactId>spring-kafka</artifactId> </dependency> 2、编写配置文件 spring: kafka: # kaf 阅读全文
posted @ 2023-01-21 07:45 Caesar_the_great 阅读(75) 评论(0) 推荐(0) 编辑
摘要:步骤: 1、创建event public class KafkaSendMsgEvent extends ApplicationEvent { private List dtoList; public KafkaSendMsgEvent(Object source, List dtoLists) { 阅读全文
posted @ 2023-01-20 18:33 Caesar_the_great 阅读(188) 评论(0) 推荐(0) 编辑
摘要:项目背景:需要在UI大屏呈现工业领域的实时数据(1s更新一次),考虑使用kafka消息中间件。主要步骤:使用定时任务,从工业领域的实时数据服务器读取数据,发送给kafka,UI团队从kafka轮询获取数据。 步骤: 1、安装zookeeper、kafka 2、实现生产者消费者 参考代码(测试类中已完 阅读全文
posted @ 2023-01-20 17:11 Caesar_the_great 阅读(336) 评论(0) 推荐(0) 编辑
摘要:1、启动zookeeper和kafka 2、安装kafka-eagle:https://blog.csdn.net/fyihdg/article/details/125587127 3、使用sqlite数据库完成搭建(默认使用的mysql,但我的版本为8.0,eagle好像不支持) 安装sqlite 阅读全文
posted @ 2023-01-16 13:08 Caesar_the_great 阅读(691) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/zouyang920/article/details/125146342 https://blog.csdn.net/qq_52117201/article/details/128377824 https://blog.csdn.net/hekaiyou/ 阅读全文
posted @ 2023-01-11 19:43 Caesar_the_great 阅读(16) 评论(0) 推荐(0) 编辑
摘要:1、使用Linux的crontab机制实现自启动 https://blog.csdn.net/cocos2dGirl/article/details/80492843 阅读全文
posted @ 2023-01-11 08:41 Caesar_the_great 阅读(29) 评论(0) 推荐(0) 编辑
摘要:1、编辑crontab文件 配置文件路径:/etc/crontab在配置文件中,原本6个段的配置,我们需要在命令前面再加一个用户段即:分 时 日 月 周 用户 命令直接添加到最后一行即可 SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILT 阅读全文
posted @ 2023-01-10 21:02 Caesar_the_great 阅读(393) 评论(0) 推荐(0) 编辑
摘要:方法1:https://blog.csdn.net/m0_61115595/article/details/126351288 (推荐) 此方法需要在mapper.java加注解: 方法2:https://www.cnblogs.com/lanxinren/p/15402925.html 阅读全文
posted @ 2023-01-04 16:22 Caesar_the_great 阅读(85) 评论(0) 推荐(0) 编辑
摘要:报错1:The server selected protocol version TLS10 is not accepted 解决:找到Java的java.security文件,并删除“TLSv1, TLSv1.1, 3DES_EDE_CBC”,这三个参数: 报错2:PKIX path buildi 阅读全文
posted @ 2023-01-04 10:47 Caesar_the_great 阅读(1069) 评论(0) 推荐(0) 编辑
摘要:本文介绍springboot工程在Linux下,打包、部署、日志配置、shell脚本自启动等一系列操作。 1、springboot工程打包 使用springboot自带的Run/Debug Configurations: 新建一个Maven Configuration: 把以下命令copy到Run中 阅读全文
posted @ 2023-01-01 22:15 Caesar_the_great 阅读(556) 评论(0) 推荐(0) 编辑
摘要:有两个方案(本文介绍方案1的使用) 1、将windows共享目录,挂载到linux系统下,通过使用本地目录访问windows共享目录 2、通过samba的java实现包,不过需要开个windows共享目录的账户 https://www.samba.org/ 1、下载samba https://blo 阅读全文
posted @ 2023-01-01 22:02 Caesar_the_great 阅读(826) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示