This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of TensorFlow 2.0 in Action and have Thushan Ganegedara on-line!
See this thread for details.
Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

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

 
Sheriff
Posts: 3036
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
  • 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?
 
Bartender
Posts: 1075
19
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • 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        

 
reply
    Bookmark Topic Watch Topic
  • New Topic