1 /*
2  * Copyright 2013-2019 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.cloud.aws.autoconfigure.messaging;
18
19 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
20 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
21 import org.springframework.cloud.aws.messaging.config.annotation.EnableSns;
22 import org.springframework.cloud.aws.messaging.config.annotation.EnableSqs;
23 import org.springframework.context.annotation.Configuration;
24
25 /**
26  * @author Alain Sahli
27  * @author Agim Emruli
28  */

29 @ConditionalOnClass(
30         name = "org.springframework.cloud.aws.messaging.listener.SimpleMessageListenerContainer")
31 @Configuration(proxyBeanMethods = false)
32 public class MessagingAutoConfiguration {
33
34     /**
35      * Auto configuration for SQS.
36      */

37     @ConditionalOnMissingBean(
38             type = "org.springframework.cloud.aws.messaging.listener.SimpleMessageListenerContainer")
39     @EnableSqs
40     @Configuration(proxyBeanMethods = false)
41     public static class SqsAutoConfiguration {
42
43     }
44
45     /**
46      * Auto configuration for SNS.
47      */

48     @ConditionalOnClass(name = "com.amazonaws.services.sns.AmazonSNS")
49     @EnableSns
50     @Configuration(proxyBeanMethods = false)
51     public static class SnsAutoConfiguration {
52
53     }
54
55 }
56