Fetch the repository succeeded.
rsa-encrypt-body-spring-boot
Spring Boot接口加密,可以对返回值、参数值通过注解的方式自动加解密
。
Apache Maven
<dependency>
<groupId>cn.shuibo</groupId>
<artifactId>rsa-encrypt-body-spring-boot</artifactId>
<version>1.0.1.RELEASE</version>
</dependency>
Gradle Groovy DSL
implementation 'cn.shuibo:rsa-encrypt-body-spring-boot:1.0.1.RELEASE'
Gradle Kotlin DSL、Scala SBT、Apache Ivy、Groovy Grape、Leiningen、Apache Buildr、Maven Central Badge、PURL、Bazel方式请阅读Spring Boot接口RSA自动加解密
<dependency>
<groupId>cn.shuibo</groupId>
<artifactId>rsa-encrypt-body-spring-boot</artifactId>
<version>1.0.1.RELEASE</version>
</dependency>
@SpringBootApplication
@EnableSecurity
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
rsa:
encrypt:
open: true # 是否开启加密 true or false
showLog: true # 是否打印加解密log true or false
publicKey: # RSA公钥
privateKey: # RSA私钥
@Encrypt
@GetMapping("/encryption")
public TestBean encryption(){
TestBean testBean = new TestBean();
testBean.setName("shuibo.cn");
testBean.setAge(18);
return testBean;
}
@Decrypt
@PostMapping("/decryption")
public String Decryption(@RequestBody TestBean testBean){
return testBean.toString();
}
Sign in for post a comment
Activity
Community
Health
Trend
Influence
:Code submit frequency
:React/respond to issue & PR etc.
:Well-balanced team members and collaboration
:Recent popularity of project
:Star counts, download counts etc.
Comments ( 33 )