spring-attic / aws-refapp Goto Github PK
View Code? Open in Web Editor NEWRefernce app for spring-cloud-aws
License: Apache License 2.0
Refernce app for spring-cloud-aws
License: Apache License 2.0
Hello,
can someone add some Junit example test?
thanks
I encountered the following 2 issues when trying to create the CloudFormation stack using the supplied template:
eu-west-1
already exists.elasticspring.org
It would be great if the instructions could be updated to include the necessary steps to overcome these issues.
I tried to run the sqs example with different releases of spring cloud. The example works with Camden.SR7. It does not work with the releases after that. Could you give me some direction on how to solve the problem?
I've run into multiple issues using the AwsSampleStack template and can't get this example working.
Starting a new Spring boot 2.5 project with Spring Cloud AWS is very confusing. Should we use io.awspring.cloud or org.springframework.cloud ? The documentation is not very verbose on the dependencies to use.
I have been completely unable to get properties like aws.paramstore.prefix to be recognized in a bootstrap file, they seem to be completely ignored. Why ?
If there are missing dependencies, what are they ?
I'm unable to find the simplest pom.xml with a config that works. I've reverted to using an old Spring boot version and the org.springframework.cloud dependencies that are perfectly fine.
The documentation would highly benefit from a clear example of dependencies and why nothing seems to autoconfigure.
Getting in to many issues while using the AwsSampleStack.template supplied in the root directory. It complained first about eu-west-2 region not available. (I am working in Chicago). I modified the template to use us-west-2. After that it complained about not having proper imageId associated with us-west-2 region. So I changed the imageId to "ami-52ff7262" to move pass this error.
Now I am stuck, it complains that Virtualization of type hvm is required for instance of type t2.micro. How do I specify this in the template. Can anyone please help.
The auto configuration should have fixed that right?
I don't have any xml files, just following this aws-refapp as it is.
This is the end point controller:
@RestController
@RequestMapping("/sns/messages")
public class SnsEndpointResource {
private static Logger LOG = LoggerFactory.getLogger(SnsEndpointResource.class);
private final SendingTextWebSocketHandler snsSendingTextWebSocketHandler;
@Autowired
public SnsEndpointResource(@Qualifier("snsWebSocketHandler") SendingTextWebSocketHandler snsSendingTextWebSocketHandler) {
this.snsSendingTextWebSocketHandler = snsSendingTextWebSocketHandler;
}
@NotificationSubscriptionMapping
public void confirmSubscription(NotificationStatus notificationStatus) {
LOG.info("Received SNS subscription {}", notificationStatus);
notificationStatus.confirmSubscription();
}
@NotificationMessageMapping
public void receiveNotification(@NotificationMessage String message, @NotificationSubject String subject) {
LOG.info("Received SNS message {} with subject {}", message, subject);
try {
this.snsSendingTextWebSocketHandler.broadcastToSessions(new DataWithTimestamp<>(new SnsNotificationDTO(subject, message)));
} catch (IOException e) {
LOG.error("Was not able to push the message to the client.", e);
}
}
}
Hi I'm new to Spring Cloud Function.
I tried to demonstrate spring-cloud-samples/function-sample-aws on AWS Lambda.
I added "function.name" property to application.properties in order to build it using Gradle and created a class extended from java.util.Function for @Component
.
that looks like this as below.
@Component("myFunction")
public class MyFunction implements Function<Foo, Bar> {
@Autowired
private Properties props;
@Override
public Bar apply(Foo value) {
return new Bar(value.uppercase() + (props.getFoo() != null ? "-" + props.getFoo() : ""));
}
}
application.properties in resources directory.
function.name=myFunction
then I executed ./gradlew build and uploaded the jar file to AWS Lambda.
but I got this exception on AWS Lambda console.
{
"errorMessage": "No function defined",
"errorType": "java.lang.IllegalStateException",
"stackTrace": [
"org.springframework.cloud.function.adapter.aws.SpringFunctionInitializer.apply(SpringFunctionInitializer.java:160)",
"org.springframework.cloud.function.adapter.aws.SpringBootRequestHandler.handleRequest(SpringBootRequestHandler.java:46)"
]
}
I did not edit the build.gradle at all. i don't know what I should do. i don't think the application can read application.properties when built using Gradle.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.