Search code examples
springspring-bootspring-cloudamazon-sqs

Migrate from springframework cloud aws messaging to awspring cloud messaging version 2.4.1


After changing my imports to use the awspring library, I had @EnableSqs marked as deprecated, how to enable sqs if @EnableSqs is deprecated?


Solution

  • In Spring Cloud version 2.3 @EnableXYZ as deprecated being replaced by use of Auto-Configuration. See doc Spring Cloud AWS 2.3 is now available.

    @EnableXXX annotations have been deprecated. We recommend using Spring Boot auto-configurations.

    How to use Auto-configuration?

    Spring Boot auto-configuration attempts to automatically configure your Spring application based on the jar dependencies that you have added. For example, if HSQLDB is on your classpath, and you have not manually configured any database connection beans, then Spring Boot auto-configures an in-memory database.

    You need to opt-in to auto-configuration by adding the @EnableAutoConfiguration or @SpringBootApplication annotations to one of your @Configuration classes.