What is the role of the @CrossOrigin annotation?
@CrossOrigin lets a Spring Boot controller or endpoint accept cross-origin browser requests. See the attributes, defaults and common pitfalls.
2,886 posts about Java: questions with answers, tutorials and articles, newest first.
@CrossOrigin lets a Spring Boot controller or endpoint accept cross-origin browser requests. See the attributes, defaults and common pitfalls.
Configure the SQS visibility timeout with Spring Cloud AWS or the AWS SDK for Java v2, extend it for slow jobs and avoid duplicate processing.
Configure CORS in Spring Boot 3 globally, per controller or with a filter, and make it work with Spring Security 6 so preflight requests succeed.
Publish and consume Amazon SQS messages in Spring Boot using SqsTemplate, @SqsListener or the AWS SDK 2.x client, with dead-letter queues and long polling.
AmazonSQSClient comes from the retired AWS SDK for Java v1. See how to send, poll and acknowledge SQS messages in Spring Boot with SqsClient or Spring Cloud AWS.
springfox-swagger2 produced Swagger 2 API docs for Spring MVC. It is now unmaintained and incompatible with Spring Boot 3, so migrate to springdoc-openapi.
Use the Spring Cloud AWS SQS starter, SqsTemplate to send and @SqsListener to receive. Covers credentials, acknowledgement, dead-letter queues and local testing.
Use springdoc-openapi instead of the unmaintained Springfox to get OpenAPI 3 documentation and Swagger UI in Spring Boot 3 with one dependency.
Learn how a Spring Boot endpoint confirms an SNS subscription, processes notifications safely, and when an SQS subscription is the better choice.
@ApiOperation describes an endpoint in legacy Swagger 2 and Springfox docs. See its attributes and how to replace it with @Operation and springdoc-openapi.
Set up Swagger UI and OpenAPI 3 docs in Spring Boot with springdoc-openapi, add annotations and security, and replace legacy Springfox.
@Valid makes Spring Boot validate controller input before your code runs. Learn the starter, constraints, error handling and how it differs from @Validated.
Add the AWS SDK v2 sns module, create an SnsClient bean and publish to a topic ARN. Covers SMS, message attributes, FIFO topics and testing.
AmazonSNSClient is the legacy AWS SDK v1 client for Amazon SNS. Learn what it does, why to move to SnsClient (SDK v2), and how to publish from Spring Boot.
Build a custom Bean Validation constraint for Spring Boot 3+: annotation, ConstraintValidator, bean injection, class-level rules and clean error responses.
@Validated is Spring's validation annotation with support for validation groups and method-level checks on beans. Learn when to use it instead of @Valid.
Publish messages from Spring Boot to Amazon SNS topics with the AWS SDK v2, fan out to SQS subscribers and secure access with IAM roles.
Add the validation starter, annotate request records with Jakarta constraints, trigger them with @Valid and return clean ProblemDetail errors for invalid input.
Send S3 object events to an SQS queue and process them in Spring Boot with Spring Cloud AWS, including queue policy, parsing and retries.
Use the AWS SDK v2 S3Client to fetch objects in Spring Boot, stream large files to the response, or hand out presigned URLs for direct downloads.