Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to Spring Boot 3 #2

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Originally developed for [spring-data-mongodb-encrypt](https://github.com/bolcom
Add dependency:

```xml
<dependency>
<groupId>com.bol</groupId>
<artifactId>cryptvault</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>com.bol</groupId>
<artifactId>cryptvault</artifactId>
<version>1.0.2</version>
</dependency>
```

And add the following to your `application.yml`:
Expand All @@ -41,15 +41,15 @@ And you're done!
Example usage:

```java
@Autowired CryptVault cryptVault;
@Autowired CryptVault cryptVault;

// encrypt
byte[] encrypted = cryptVault.encrypt("rock".getBytes());
// encrypt
byte[] encrypted = cryptVault.encrypt("rock".getBytes());

// decrypt
byte[] decrypted = cryptVault.decrypt(encrypted);
new String(decrypted).equals("rock"); // true
// decrypt
byte[] decrypted = cryptVault.decrypt(encrypted);

new String(decrypted).equals("rock"); // true
```

## Manual configuration
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<artifactId>cryptvault</artifactId>
<packaging>jar</packaging>
<name>cryptvault</name>
<version>1.0.2</version>
<version>3-1.0.2</version>
<description>Versioned crypto library</description>
<url>https://github.com/bolcom/cryptvault</url>

Expand Down Expand Up @@ -43,26 +43,26 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.4.0</version>
<version>3.2.3</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.4.0</version>
<version>3.2.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.18.1</version>
<version>3.25.3</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/bol/config/CryptVaultAutoConfiguration.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package com.bol.config;

import com.bol.crypt.CryptVault;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import java.util.Base64;
import java.util.List;

@Configuration
@AutoConfiguration
@ConditionalOnProperty("cryptvault.keys[0].key")
public class CryptVaultAutoConfiguration {

Expand Down
1 change: 0 additions & 1 deletion src/main/resources/META-INF/spring.factories

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
com.bol.config.CryptVaultAutoConfiguration
Loading