• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown

SQS AWS Integration:can't make sense of this example code

Posts: 3061
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm pretty new to Spring AWS integration. Right now I'm just trying to get a prototype working that will implement a message listener for an SQS  ... something like you'd handle in JEE with RabbitMQ and an MDB. The example I'm seeing at libraries.io and repeated elsewhere at various sites has this setup code:

First, it's annotated as SpringBootApplication not Configuration. That doesn't seem to be a typo, because they have many examples done the same way. Also, the class is declared static, so it can't be an outer class. Maybe the intention is that this should be an inner class within the Spring Boot class? There's nothing to suggest this interpretation though, and it would still need a Configuration annotation, wouldn't it?
Posts: 1108
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greg, the @SpringBootApplication annotation is a shortcut for the other three common annotations @Configuration, @EnableAutoConfiguration and @ComponentScan.

@SpringBootApplication Spring Boot Reference Guide

Sorry that this is just half an answer, I'm still trying to work out exactly how Java / Spring / AWS fit together.  From AWS I'm seeing a movement towards serverless (aws lambda) while I'm thinking spring boot would require servers (EC2) with IAM roles defined to allow access to the queuing service.  Maybe you could use Spring with AWS Lambda        

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic