学习
止礼
这个作者很懒,什么都没留下…
展开
-
mysql binlog数据恢复
log文件列表– 可查看log文件路径– 正在使用的log文件– 生成新log文件flush logs;– 查看文件信息mysqlbinlog工具常用参数–start-datetime 查询起始时间戳。–stop-datetime 查询终止时间戳。–start-position binlog的偏移量起始值–stop-position binlog的偏移量终止值–database 查询指定数据库的log日志。原创 2022-11-11 15:19:58 · 571 阅读 · 0 评论 -
Netty-WebsocketDemo
package com.websocket;import io.netty.bootstrap.ServerBootstrap;import io.netty.channel.ChannelHandlerContext;import io.netty.channel.ChannelInitializer;import io.netty.channel.ChannelOption;import io.netty.channel.EventLoopGroup;import io.netty.cha原创 2022-04-06 23:03:37 · 124 阅读 · 0 评论 -
对称、非对称加密解密、数字签名
package com.crypto;import org.junit.jupiter.api.BeforeEach;import org.junit.jupiter.api.Test;import javax.crypto.BadPaddingException;import javax.crypto.Cipher;import javax.crypto.IllegalBlockSizeException;import javax.crypto.NoSuchPaddingException原创 2022-03-27 23:51:41 · 291 阅读 · 0 评论 -
NIO实现聊天室
参考自尚硅谷视频服务端代码**package service;import java.io.IOException;import java.net.InetSocketAddress;import java.nio.ByteBuffer;import java.nio.channels.SelectableChannel;import java.nio.channels.SelectionKey;import java.nio.channels.Selector;import java.原创 2022-03-20 22:54:49 · 256 阅读 · 0 评论 -
Spring获取代理类
方式一@AutowiredApplicationContext applicationContext;applicationContext.getBean(接口类.class)方式二(xxx) AopContext.currentProxy();注意方式二Cannot find current proxy: Set ‘exposeProxy’ property on Advised to ‘true’ to make it available.添加:@EnableAspectJAutoP原创 2022-01-27 10:42:22 · 1274 阅读 · 0 评论 -
spring 拦截器处理
解决方案:WebMvcConfigurer + @WebFilter注意事项@WebFilter不生效,则在启动类添加@ServletComponentScanpackage com.fengniao.mall.operation.config;import com.alibaba.fastjson.JSON;import lombok.extern.slf4j.Slf4j;import org.springframework.context.annotation.Configuration原创 2021-09-16 13:30:46 · 108 阅读 · 0 评论 -
spring+redis 切换不同的库
https://bbs.huaweicloud.com/blogs/detail/112141转载 2021-09-14 13:42:50 · 126 阅读 · 0 评论 -
Clion调试redis
参考自:https://www.jianshu.com/p/ae7b61c89e23我是2021.7.2日clone的unstable分支,对参考文章做出了一些调整deps\hdr_histogram\CMakeLists.txt add_library(hdr_histogram hdr_histogram.c)deps\hiredis\CMakeLists.txt 当前版本已有生成动态库的操作(ADD_LIBRARY(hiredis SHARED ${hiredis_sources}))所以原创 2021-07-03 19:06:05 · 491 阅读 · 0 评论 -
redis-源码构建(windows环境)
准备环境下载cygwin64工具,用于下载所需依赖下载地址:https://www.cygwin.com/如:gcc、make、zip、unzip依赖安装不全不用担心之后可以再用此工具补充安装集成开发工具:clion步骤下载源代码:https://github.com/redis/redis修改部分文件因windows环境导致的编译错误src\mkreleasehdr.sh 脚本文件需要将windows换行符修改为unix的换行符(LF),不然会报错CC rel原创 2021-07-03 12:29:22 · 640 阅读 · 2 评论 -
Spring boot配置多数据源
注意事项配置文件配置数据源时一定要用jdbc-url 使用url会报错指定数据源所使用的mapper路径factoryBean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper/db1/.xml"));@MapperScan 中的 basePackages 是dao层的包路径 。sqlSessionFactoryRef 、 sqlSessionTemp原创 2021-05-21 15:55:37 · 98 阅读 · 0 评论 -
HTML生成PDF
HTML生成PDF引入POM例子所用完整依赖<properties> <itext.version>7.1.11</itext.version> <itext.pdfhtml.version>3.0.0</itext.pdfhtml.version> <itext.pdfrender.version>1.0.1</itext.pdfrender.version>原创 2020-07-04 10:26:54 · 279 阅读 · 0 评论 -
多线程之线程池
多线程之线程池一:线程池作用1.用线程池管理并复用线程、控制最大并发数2.可以让线程使用不同任务线程队列缓存策略和拒绝机制二: ThreadPoolExecutor 线程池核心构造函数参数corePoolSize 核心线程数MaximumPoolSize 最大线程数keepAliveTime 任务在队列中存活时间unit 存活的时间单位workQueue 用于保存任务的队列...原创 2020-04-04 20:14:03 · 103 阅读 · 0 评论 -
分布式事务
分布式事务的解决方案CAP理论C: Consistency 一致性A: Availability 可用性P: Partition tolerance 分区隔离BASE理论BA: Basically Available 基本可用S: Soft state 软状态E: Eventually consistent 最终一致性2pc协议2阶段提交协议 准备阶段和提交阶段实现方案...原创 2020-02-14 09:33:27 · 67 阅读 · 0 评论 -
安装Oracle 12c
参考:https://blog.csdn.net/fw19940314/article/details/80183578https://zhuanlan.zhihu.com/p/52006870两位大牛有少许不同 结合者看可适用不同版本1.安装必要依赖注意进入图形界面出现 -java.library.path中没有oraInstaller 是因为缺少 libnsl.x86_64其中有些...原创 2019-12-18 18:11:36 · 146 阅读 · 0 评论 -
OPCUA client 相关方法
using System;using System.Threading;using System.Threading.Tasks;using Opc.Ua;using Opc.Ua.Client;using Opc.Ua.Configuration;namespace ConsoleApp1{//参考至:https://github.com/dathlin/OpcUaHelper...原创 2019-12-10 16:13:36 · 4931 阅读 · 0 评论 -
form时间传值
form 表单时间传值方式一前台let formData = new FormData();formData.append('badDate', "2018-11-12");后台/** * 使用对象接受 实体列中要添加注解 **///controllerpublic ResponseWrapper<String> addBadMsg(PartBadInfo par...原创 2019-11-23 17:20:33 · 404 阅读 · 0 评论 -
spring boot 整合redis的订阅功能
spring boot 整合redis的订阅功能pom.xml<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId></dependency&...原创 2019-11-23 17:17:54 · 127 阅读 · 0 评论 -
nginx
一: linux//检查端口是否开放nc -zv 192.168.96.134 80//监听端口nc -l 8080二:开放nginx的默认80端口 使它可以外部访问CenetOS 7//禁用防火墙systemctl disable firewalld //安装iptables 并激活yum install iptables-servicessystemctl enable...原创 2019-11-15 14:31:25 · 59 阅读 · 0 评论 -
上传文件
方式一:前台 ://创建一个FormData对象用来存储文件流let formData = new FormData();//可传多个文件 直接 append追加就行formData.append('file',文件1)formData.append('file',文件2)//传其他值formData.append('id', "1");...// 我使用的时vue的a...原创 2019-11-08 23:33:03 · 129 阅读 · 0 评论 -
Oauth2 爬坑
一 配置授权服务器整理自https://www.jianshu.com/p/227f7e7503cb一 配置内存问题一: User must be authenticated with Spring Security before authorization can be completed.则需要实现 WebSecurityConfigurerAdapter问题二: error=“i...原创 2019-11-05 14:12:44 · 468 阅读 · 0 评论 -
redis
常用命令1.启动redis服务 nohup redis-server > redis.log 2>&1 &2.停止服务 redis-cli shutdown3.切换数据库 SELECT [index]4.自增长数值 INCR [key]5.查询key keys *6.清空实例中所有数据库 FLUSHALL7.删除key DEL [key]8.解决存入...原创 2019-07-26 21:41:56 · 98 阅读 · 0 评论 -
常用命令
Linux1.查看正在占用端口 lsof1.1指定端口 -i: 例: lsof -i:33062.终端常用快捷键2.1光标移动到开始位置 Ctrl+a2.2光标移动到结束位置 Ctrl+e2.3删除从此处到结束位置的所有内容 Ctrl+k2.4删除从此处到开始位置的所有内容 Ctrl+u3.wifi信息目录 /etc/NetworkManager/s...原创 2019-05-31 22:59:26 · 57 阅读 · 0 评论 -
Idea 常用插件
阿里规范检查 : Alibaba Java Coding Guidelineslog中的SQL注入参数:MyBatis Log Plugin功能强大的Mybatis插件:MyBatisCodeHelperPro字符转换:String Manipulation 和 CamelCase翻译:Translation...原创 2019-05-28 20:58:14 · 91 阅读 · 0 评论 -
好用的网站
IntelliJ IDEA使用:https://www.evget.com/article/2017/9/25/26908.htmlIntelliJ IDEA 下的svn配置:https://blog.csdn.net/qq_27093465/article/details/74898489https://github.com/judasn/IntelliJ-IDEA-Tutorial程序猿...原创 2019-03-18 08:22:16 · 111 阅读 · 0 评论 -
git
提交忽略的文件 .gitignore.idea/out/.gitignoremvnmvnw*.cmd*.iml;test/.mvn/1.提交 git commit1.1 将提交备注写在命令行 -m 例: git commit -m “提交”1.2 跳过暂存(不用在手动 git add) -a1.3 将修改详细放入编辑器 -v2.删除 git rm2.1 强制...原创 2019-03-25 22:17:13 · 78 阅读 · 0 评论