This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
ext { | |
springBootVersion = '2.0.7.RELEASE' | |
} | |
repositories { | |
mavenCentral() | |
maven { url "https://plugins.gradle.org/m2/" } | |
} | |
dependencies { | |
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String encrypt(){ | |
String keyId = "arn:aws:kms:..."; | |
ByteBuffer plaintext = ByteBuffer.wrap("plainText".getBytes()); | |
EncryptRequest req = new EncryptRequest() | |
.withKeyId(keyId) | |
.withPlaintext(plaintext); | |
ByteBuffer ciphertext = AWSKMSClient.encrypt(req).getCiphertextBlob(); | |
return Base64.getEncoder().encodeToString(ciphertext.array()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Date; | |
import java.util.concurrent.*; | |
/** | |
* Created by eratakumi on 2017/05/31. | |
*/ | |
public class CallableSample { | |
public static void main(String[] args){ | |
ExecutorService ex = Executors.newSingleThreadExecutor(); | |
System.out.println("Start : " + new Date()); |