diff --git a/gradle.properties b/gradle.properties index cd5f64d8e..23ecaaa08 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,8 +18,8 @@ slug=agorapulse/micronaut-aws-sdk group=com.agorapulse -micronautVersion = 4.5.0 -micronautGradlePluginVersion = 4.4.0 +micronautVersion = 4.2.0 +micronautGradlePluginVersion = 4.2.0 gruVersion = 2.0.5 awsSdkVersion = 1.12.692 awsSdk2Version = 2.25.22 diff --git a/subprojects/micronaut-amazon-awssdk-dynamodb/src/main/java/com/agorapulse/micronaut/amazon/awssdk/dynamodb/ServiceIntroduction.java b/subprojects/micronaut-amazon-awssdk-dynamodb/src/main/java/com/agorapulse/micronaut/amazon/awssdk/dynamodb/ServiceIntroduction.java index 05679cdbd..719141eb1 100644 --- a/subprojects/micronaut-amazon-awssdk-dynamodb/src/main/java/com/agorapulse/micronaut/amazon/awssdk/dynamodb/ServiceIntroduction.java +++ b/subprojects/micronaut-amazon-awssdk-dynamodb/src/main/java/com/agorapulse/micronaut/amazon/awssdk/dynamodb/ServiceIntroduction.java @@ -18,6 +18,7 @@ package com.agorapulse.micronaut.amazon.awssdk.dynamodb; import com.agorapulse.micronaut.amazon.awssdk.dynamodb.annotation.Service; +import io.micronaut.aop.InterceptorBean; import io.micronaut.aop.MethodInterceptor; import io.micronaut.aop.MethodInvocationContext; import io.micronaut.core.annotation.AnnotationValue; @@ -27,6 +28,7 @@ * Introduction for {@link com.agorapulse.micronaut.amazon.awssdk.dynamodb.annotation.Service} annotation. */ @Singleton +@InterceptorBean(Service.class) public class ServiceIntroduction implements MethodInterceptor { private final DynamoDbServiceIntroduction introduction; diff --git a/subprojects/micronaut-amazon-awssdk-kinesis/src/main/java/com/agorapulse/micronaut/amazon/awssdk/kinesis/KinesisClientIntroduction.java b/subprojects/micronaut-amazon-awssdk-kinesis/src/main/java/com/agorapulse/micronaut/amazon/awssdk/kinesis/KinesisClientIntroduction.java index 40ef773a8..f83b0f766 100644 --- a/subprojects/micronaut-amazon-awssdk-kinesis/src/main/java/com/agorapulse/micronaut/amazon/awssdk/kinesis/KinesisClientIntroduction.java +++ b/subprojects/micronaut-amazon-awssdk-kinesis/src/main/java/com/agorapulse/micronaut/amazon/awssdk/kinesis/KinesisClientIntroduction.java @@ -24,6 +24,7 @@ import com.agorapulse.micronaut.amazon.awssdk.kinesis.annotation.Stream; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import io.micronaut.aop.InterceptorBean; import io.micronaut.aop.MethodInterceptor; import io.micronaut.aop.MethodInvocationContext; import io.micronaut.context.BeanContext; @@ -45,6 +46,7 @@ import java.util.UUID; @Singleton +@InterceptorBean(KinesisClient.class) @Requires(classes = software.amazon.awssdk.services.kinesis.KinesisClient.class) public class KinesisClientIntroduction implements MethodInterceptor { diff --git a/subprojects/micronaut-amazon-awssdk-lambda/src/main/java/com/agorapulse/micronaut/amazon/awssdk/lambda/LambdaClientIntroduction.java b/subprojects/micronaut-amazon-awssdk-lambda/src/main/java/com/agorapulse/micronaut/amazon/awssdk/lambda/LambdaClientIntroduction.java index 1caa2db1e..c0c900f6e 100644 --- a/subprojects/micronaut-amazon-awssdk-lambda/src/main/java/com/agorapulse/micronaut/amazon/awssdk/lambda/LambdaClientIntroduction.java +++ b/subprojects/micronaut-amazon-awssdk-lambda/src/main/java/com/agorapulse/micronaut/amazon/awssdk/lambda/LambdaClientIntroduction.java @@ -22,6 +22,7 @@ import com.agorapulse.micronaut.amazon.awssdk.lambda.annotation.LambdaClient; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectMapper; +import io.micronaut.aop.InterceptorBean; import io.micronaut.aop.MethodInterceptor; import io.micronaut.aop.MethodInvocationContext; import io.micronaut.context.BeanContext; @@ -45,6 +46,7 @@ import java.util.function.Function; @Singleton +@InterceptorBean(LambdaClient.class) @Requires(classes = software.amazon.awssdk.services.lambda.LambdaClient.class) public class LambdaClientIntroduction implements MethodInterceptor { diff --git a/subprojects/micronaut-amazon-awssdk-sns/src/main/java/com/agorapulse/micronaut/amazon/awssdk/sns/NotificationClientIntroduction.java b/subprojects/micronaut-amazon-awssdk-sns/src/main/java/com/agorapulse/micronaut/amazon/awssdk/sns/NotificationClientIntroduction.java index aab23f1a1..7bf4917f1 100644 --- a/subprojects/micronaut-amazon-awssdk-sns/src/main/java/com/agorapulse/micronaut/amazon/awssdk/sns/NotificationClientIntroduction.java +++ b/subprojects/micronaut-amazon-awssdk-sns/src/main/java/com/agorapulse/micronaut/amazon/awssdk/sns/NotificationClientIntroduction.java @@ -24,6 +24,7 @@ import com.agorapulse.micronaut.amazon.awssdk.sns.annotation.Topic; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import io.micronaut.aop.InterceptorBean; import io.micronaut.aop.MethodInterceptor; import io.micronaut.aop.MethodInvocationContext; import io.micronaut.context.BeanContext; @@ -42,6 +43,7 @@ import java.util.function.Function; @Singleton +@InterceptorBean(NotificationClient.class) public class NotificationClientIntroduction implements MethodInterceptor { private static final String SUBJECT = "subject"; @@ -58,7 +60,7 @@ private static class PublishingArguments { Argument attributes; Argument messageGroupId; Argument messageDeduplicationId; - + boolean isValid() { return message != null; } diff --git a/subprojects/micronaut-amazon-awssdk-sqs/src/main/java/com/agorapulse/micronaut/amazon/awssdk/sqs/QueueClientIntroduction.java b/subprojects/micronaut-amazon-awssdk-sqs/src/main/java/com/agorapulse/micronaut/amazon/awssdk/sqs/QueueClientIntroduction.java index dcf5afa35..e5048e653 100644 --- a/subprojects/micronaut-amazon-awssdk-sqs/src/main/java/com/agorapulse/micronaut/amazon/awssdk/sqs/QueueClientIntroduction.java +++ b/subprojects/micronaut-amazon-awssdk-sqs/src/main/java/com/agorapulse/micronaut/amazon/awssdk/sqs/QueueClientIntroduction.java @@ -22,6 +22,7 @@ import com.agorapulse.micronaut.amazon.awssdk.sqs.annotation.QueueClient; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import io.micronaut.aop.InterceptorBean; import io.micronaut.aop.MethodInterceptor; import io.micronaut.aop.MethodInvocationContext; import io.micronaut.context.BeanContext; @@ -39,6 +40,7 @@ import java.util.function.Function; @Singleton +@InterceptorBean(QueueClient.class) @Requires(classes = SqsClient.class) public class QueueClientIntroduction implements MethodInterceptor { diff --git a/subprojects/micronaut-aws-sdk-dynamodb/src/main/groovy/com/agorapulse/micronaut/aws/dynamodb/ServiceIntroduction.java b/subprojects/micronaut-aws-sdk-dynamodb/src/main/groovy/com/agorapulse/micronaut/aws/dynamodb/ServiceIntroduction.java index b5291d0f5..8865ec0b0 100644 --- a/subprojects/micronaut-aws-sdk-dynamodb/src/main/groovy/com/agorapulse/micronaut/aws/dynamodb/ServiceIntroduction.java +++ b/subprojects/micronaut-aws-sdk-dynamodb/src/main/groovy/com/agorapulse/micronaut/aws/dynamodb/ServiceIntroduction.java @@ -26,6 +26,7 @@ import com.amazonaws.services.dynamodbv2.datamodeling.IDynamoDBMapper; import com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException; import groovy.lang.Closure; +import io.micronaut.aop.InterceptorBean; import io.micronaut.aop.MethodInterceptor; import io.micronaut.aop.MethodInvocationContext; import io.micronaut.context.annotation.Requires; @@ -45,6 +46,7 @@ * Introduction for {@link Service} annotation. */ @Singleton +@InterceptorBean(Service.class) @Requires(classes = IDynamoDBMapper.class) public class ServiceIntroduction implements MethodInterceptor { diff --git a/subprojects/micronaut-aws-sdk-kinesis/src/main/groovy/com/agorapulse/micronaut/aws/kinesis/KinesisClientIntroduction.java b/subprojects/micronaut-aws-sdk-kinesis/src/main/groovy/com/agorapulse/micronaut/aws/kinesis/KinesisClientIntroduction.java index a3077b037..e826c4ce5 100644 --- a/subprojects/micronaut-aws-sdk-kinesis/src/main/groovy/com/agorapulse/micronaut/aws/kinesis/KinesisClientIntroduction.java +++ b/subprojects/micronaut-aws-sdk-kinesis/src/main/groovy/com/agorapulse/micronaut/aws/kinesis/KinesisClientIntroduction.java @@ -28,6 +28,7 @@ import com.amazonaws.services.kinesis.model.ResourceNotFoundException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import io.micronaut.aop.InterceptorBean; import io.micronaut.aop.MethodInterceptor; import io.micronaut.aop.MethodInvocationContext; import io.micronaut.context.BeanContext; @@ -42,6 +43,7 @@ import java.util.*; @Singleton +@InterceptorBean(KinesisClient.class) @Requires(classes = AmazonKinesis.class) public class KinesisClientIntroduction implements MethodInterceptor { diff --git a/subprojects/micronaut-aws-sdk-lambda/src/main/groovy/com/agorapulse/micronaut/aws/lambda/LambdaClientIntroduction.java b/subprojects/micronaut-aws-sdk-lambda/src/main/groovy/com/agorapulse/micronaut/aws/lambda/LambdaClientIntroduction.java index 6b4f11b43..e93399d60 100644 --- a/subprojects/micronaut-aws-sdk-lambda/src/main/groovy/com/agorapulse/micronaut/aws/lambda/LambdaClientIntroduction.java +++ b/subprojects/micronaut-aws-sdk-lambda/src/main/groovy/com/agorapulse/micronaut/aws/lambda/LambdaClientIntroduction.java @@ -26,6 +26,7 @@ import com.amazonaws.services.lambda.model.InvokeResult; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectMapper; +import io.micronaut.aop.InterceptorBean; import io.micronaut.aop.MethodInterceptor; import io.micronaut.aop.MethodInvocationContext; import io.micronaut.context.BeanContext; @@ -46,6 +47,7 @@ import java.util.function.Function; @Singleton +@InterceptorBean(LambdaClient.class) @Requires(classes = AWSLambda.class) public class LambdaClientIntroduction implements MethodInterceptor { diff --git a/subprojects/micronaut-aws-sdk-sns/src/main/groovy/com/agorapulse/micronaut/aws/sns/NotificationClientIntroduction.java b/subprojects/micronaut-aws-sdk-sns/src/main/groovy/com/agorapulse/micronaut/aws/sns/NotificationClientIntroduction.java index 757e0cb72..3c1599bbe 100644 --- a/subprojects/micronaut-aws-sdk-sns/src/main/groovy/com/agorapulse/micronaut/aws/sns/NotificationClientIntroduction.java +++ b/subprojects/micronaut-aws-sdk-sns/src/main/groovy/com/agorapulse/micronaut/aws/sns/NotificationClientIntroduction.java @@ -27,6 +27,7 @@ import com.amazonaws.services.sns.model.PublishRequest; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import io.micronaut.aop.InterceptorBean; import io.micronaut.aop.MethodInterceptor; import io.micronaut.aop.MethodInvocationContext; import io.micronaut.context.BeanContext; @@ -44,6 +45,7 @@ import java.util.function.Function; @Singleton +@InterceptorBean(NotificationClient.class) @Requires(classes = AmazonSNS.class) public class NotificationClientIntroduction implements MethodInterceptor { diff --git a/subprojects/micronaut-aws-sdk-sqs/src/main/groovy/com/agorapulse/micronaut/aws/sqs/QueueClientIntroduction.java b/subprojects/micronaut-aws-sdk-sqs/src/main/groovy/com/agorapulse/micronaut/aws/sqs/QueueClientIntroduction.java index e5e26cf4e..a3c79eddc 100644 --- a/subprojects/micronaut-aws-sdk-sqs/src/main/groovy/com/agorapulse/micronaut/aws/sqs/QueueClientIntroduction.java +++ b/subprojects/micronaut-aws-sdk-sqs/src/main/groovy/com/agorapulse/micronaut/aws/sqs/QueueClientIntroduction.java @@ -24,6 +24,7 @@ import com.amazonaws.services.sqs.model.QueueDoesNotExistException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import io.micronaut.aop.InterceptorBean; import io.micronaut.aop.MethodInterceptor; import io.micronaut.aop.MethodInvocationContext; import io.micronaut.context.BeanContext; @@ -39,6 +40,7 @@ import java.util.function.Function; @Singleton +@InterceptorBean(QueueClient.class) @Requires(classes = AmazonSQS.class) public class QueueClientIntroduction implements MethodInterceptor {