原创 Spring Boot 整合Spring Security + JWT 實現權限認證授權

Pom 依賴: <!-- spring security --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>sp

原创 基於微服務網關gateway的token認證機制、限流熔斷

引入maven依賴 <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artif

原创 Spring Security 之 AbstractAuthenticationProcessingFilter 源碼解析

 SpringSecurity對Spring Web項目提供支持,AbstractAuthenticationProcessingFilte 作爲驗證請求入口的。 AbstractAuthenticationProcessingFilte

原创 MappedStatement 詳解

MyBatis通過MappedStatement描述<select|update|insert|delete>或者@Select、@Update等註解配置的SQL信息。在介紹MappedStatement組件之前,我們先來了解一下MyBa

原创 Spring Security 之 UsernamePasswordAuthenticationFilter 源碼

UsernamePasswordAuthenticationFilter 是 AbstractAuthenticationProcessingFilter 的子類,主要作用是對用戶身份信息的驗證。 關於 AbstractAuthentic

原创 Spring Security 之 AuthenticationManager 源碼解析

在 UsernamePasswordAuthenticationFilter 源碼分析 中,最後在類UsernamePasswordAuthenticationFilter 的驗證方法 attemptAuthentication() 會將

原创 MySQL行鎖和表鎖的含義及區別

MySQL常用引擎有MyISAM和InnoDB,而InnoDB是mysql默認的引擎。MyISAM不支持行鎖,而InnoDB支持行鎖和表鎖。   如何加鎖? MyISAM在執行查詢語句(SELECT)前,會自動給涉及的所有表加讀鎖,在執行

原创 nginx + nacos 集羣 (linux)

nacos 下載地址   https://github.com/alibaba/nacos/releases/tag/1.1.4(我的是1.1.4) 解壓nacos tar zxvf nacos-server-1.1.4.tar.g

原创 支付寶支付 沙箱測試

支付寶平臺文檔中心 https://opendocs.alipay.com/open/270/105900 開發者中心 https://developers.alipay.com/platform/developerIndex.htm 沙

原创 @Transactional 事務失效場景

註解@Transactional的底層實現是spring AOP,而spring AOP技術使用的是動態代理。 對於靜態(static) 方法 和 非 (public) 方法,註解@Transactional失效 類方法的自調用 :一個類

原创 通用pom.xml

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org

原创 Spring Cloud 父工程搭建和idea環境配置

新建maven工程 配置字符編碼 註解激活生效 設置項目的java編譯環境 過濾不需要的文件 整理pom.xml <?xml version="1.0" encoding="UTF-8"?> <proj

原创 SpringBoot 配置攔截器方式

 一、基於URL實現的攔截器:   /** * @description:常量類 * @author: Lxq * @date: 2020/5/25 8:58 */ public class Const { /**

原创 Class.forName 和 ClassLoader

在java中Class.forName()和ClassLoader都可以對類進行加載。ClassLoader就是遵循雙親委派模型最終調用啓動類加載器的類加載器,實現的功能是“通過一個類的全限定名來獲取描述此類的二進制字節流”,獲取到二進制

原创 JAVA淺克隆(ShallowClone)和深克隆(DeepClone)。

在Java語言中,數據類型分爲值類型(基本數據類型)和引用類型,值類型包括int、double、byte、boolean、char等簡單數據類型,引用類型包括類、接口、數組等複雜類型。淺克隆和深克隆的主要區別在於是否支持引用類型的成員變量