# encryAdecry-spring-boot-starter **Repository Path**: m_blogs/encry-adecry-spring-boot-starter ## Basic Information - **Project Name**: encryAdecry-spring-boot-starter - **Description**: 非入侵式的加解密组件 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2024-02-28 - **Last Updated**: 2024-02-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 版本 1. JDK8 2. SpringBoot 2.3.5 3. Maven 3.6.3 ## 基本介绍 全局加解密组件,用于接口请求和响应的数据加解密需求,组件采用默认加解密方式为国密(非对称加密SM2); ## 优势 1. 组件最小化,方便项目引用,开发、迭代、扩展方便; 2. 基于配置文件:支持算法类型的选择和扩展; 3. 基于接口+注解实现:支持加解密方式的扩展; 4. 团队复用度高且对业务没有侵入; ## 引用 ```xml com.xbhog encryAdecry-spring-boot-starter 1.0.0 ``` ## 使用 在对应的接口上添加注解`@SecuritySupport`即可; 针对自定义加密类,实现`SecurityHandler`接口即可,后通过指定进行使用:`@SecuritySupport(securityHandler = "demoSecurityHandlerImpl")` 算法以及唯一表示可通过配置文件指定: ```txt encryption.type.algorithmType = SM2 encryption.type.key = dasdasdsa ```