10

I have been trying to find documentation of @enablesns @enablesqs annotations but can't find them.

They seem to be required for the sqs and sns integration to work. But I'd just like to have a better understanding, and be sure I'm not using them wrong.

Any description would be of great help.

froi
  • 7,268
  • 5
  • 40
  • 78
  • 1
    Maybe a look in the [configuration tests](https://github.com/spring-cloud/spring-cloud-aws/tree/master/spring-cloud-aws-messaging/src/test/java/org/springframework/cloud/aws/messaging/config/annotation) might help – Clijsters Sep 12 '18 at 08:46

1 Answers1

5

Looking at the source code for those two annotations:

@Import({SnsConfiguration.class, SnsWebConfiguration.class})
public @interface EnableSns

Where @Import does the following:

@interface Import: Indicates one or more @Configuration classes to import.

Long story short: Those annotations only combine multiple @Configuration classes into one single annotation.

E.g. @EnableSns does the same as adding @SnsConfiguration and @SnsWebConfiguration which provide you with AmazonSNS, RegionProvider and AWSCredentialsProvider beans.

mana
  • 6,347
  • 6
  • 50
  • 70