原创 Minio中桶規則

https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html A bucket is owned by the AWS account that crea

原创 筆記-使用LCN分佈式事物demo

注意事項: 1.tx-lcn版本5.0.2.RELEASE,對應springboot版本:2.1.2.RELEASE 2.先啓動LCN事務協調器,具體見:【配置LCN事物協調器】 3.客戶端添加依賴: <dependency> <gr

原创 筆記-配置LCN事務協調器

1.下載源碼:https://github.com/codingapi/tx-lcn 選擇分支 2.執行tx-manager.sql的sql,創建tx-manager庫及t_tx_exception表 3.修改txlcn-tm\src\

原创 springboot2.0集成百度uidgenerator【筆記】

一句該文章做的筆記:https://blog.csdn.net/a13794479495/article/details/83541569 1.下載源碼https://github.com/baidu/uid-generator,並依據官

原创 項目中常用的19條MySQL優化

做個筆記,來源於https://zhuanlan.zhihu.com/p/49888088 1、EXPLAIN   做MySQL優化,我們要善用EXPLAIN查看SQL執行計劃。 下面來個簡單的示例,標註(1、2、3、4、5)我們要重點關

原创 Spring Cloud Eureka 常用配置及說明

轉自:https://www.cnblogs.com/li3807/p/7282492.html 配置參數 默認值 說明 服務註冊中心配置    Bean類:org.springframework.cloud.net

原创 springboot全局處理異常

1.先決條件: springboot默認異常路徑/error 2.訪問http://localhost/user/get/-1 3.出錯後,/error請求會映射到該controller     4.配置error頁面,404,5

原创 kryo實現序列化至硬盤與從硬盤反序列

1.依賴 <!--序列化工具包--> <dependency> <groupId>com.esotericsoftware</groupId> <artifactId>kryo</artifactId>

原创 springboot2.x adminUI監控

1.server端 pom.xml <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent<

原创 spring發送郵件附件顯示名中文亂碼的解決

原效果: 處理代碼 MimeMessageHelper helper = new MimeMessageHelper(message, true,"UTF-8"); 和helper.addAttachment(MimeUtility.

原创 基於redis分佈式鎖實現quartz調度集羣

要求:不使用quartz創建表。 1.springboot工程,quartz創建job由spring管理,具體方式詳見:quartz創建job由spring管理 2.配置redis分佈式鎖,具體方式詳見:配置redis分佈式鎖 3.採用t

原创 實現redis分佈式鎖

springboot工程。redis哨兵 1.配置redis模板 import org.springframework.context.annotation.Bean; import org.springframework.contex

原创 SpringBoot監聽Redis的Key過期事件

原文鏈接:https://javaweb.io/post/198 Redis的配置 修改conf文件 notify-keyspace-events "Ex" 該配置表示監聽key的過期事件,默認未開啓 該配置的其他信息(可以監聽N多事件)

原创 springboot整合使用Apollo配置中心

1.創建C:\opt\settings\server.properties目錄,並填寫內容【env=DEV】 2.創建springboot 項目 版本1.5.17.RELEASE 3.添加Apollo依賴 <!--apollo相關jar

原创 update 結果集的優化

表記錄條數: SELECT count(1) from db.table1 原sql: UPDATE db.table SET attr1 =1 WHERE attr2 IN ( SELECT A.attr2 FR