AWS Lambda with Spring Boot

Greg Emerick Articles, AWS, Cloud, Development Technologies & Tools, Java, Spring, Spring Boot 12 Comments

The typical deployment scenario for a Spring Boot application in AWS involves running the Java application on an EC2 instance 24 hours a day. Of course, the application could be deployed in AWS ECS as a Docker container, but it still runs continuously on an EC2 instance. In each case, the EC2 instances need to be monitored and you pay for compute capacity used by that EC2 instance.

AWS Lambda provides low cost compute with zero maintenance. Lambda runs your code on demand, without provisioned and managed servers. Lambda automatically runs and scales your code. You are charged for every 100ms your code executes and the number of times your code is triggered. If the code isn’t running, you pay nothing.

Lambda has clear cost and maintenance benefits. But what does it take to run the standard Spring Boot application as a Lambda? How does it work? What are the drawbacks? These are the questions that will be answered in this blog through a tangible example…

Spring Boot Profiles: A Strategic Way to Configure Applications

Greg Rice Articles, Development Technologies & Tools, Java, Spring, Spring Boot 1 Comment

Most applications use properties as variables or parameters that have been extracted from the main logic and injected into the application at runtime. Traditionally, these properties existed in files deployed to the server.

One application of Spring Boot is the Profile feature, which allows developers to place related properties and their values into application properties files, thus allowing deployment scripts to refer to the logical groupings of properties with a single environment variable reference at runtime, which greatly simplifies the application.

In this blog, I’ll provide an introduction to Spring Boot Profiles, showing Profiles in action with tangible code examples…

Real-Time Communication: Implementing Websockets With Spring Boot

Thomas Kendall Articles, Development Technologies & Tools, Java, JavaScript, Spring Boot 3 Comments

When developing web applications, we sometimes need to push server events down to connected clients. However, HTTP was not designed to allow this. To get around this limitation, a polling pattern was established where web pages would intermittently poll the server for any new events. This pattern was not ideal as it added HTTP overhead, was only as fast as the polling rate, and caused unnecessary load on the server.

Luckily, with the emergence of HTML5 came the WebSocket. The WebSocket protocol enables interaction between a browser and a web server with lower overheads. In this blog we’ll introduce the Websockets API and show how to implement Websockets with Spring Boot.

Auto-Publishing & Monitoring APIs With Spring Boot

David Pitt API Development, Articles, Development Technologies & Tools, Keyhole Creations, Microservices, REST, Spring Boot, Tutorial Leave a Comment

If you are heading down the path of a Microservices style of architecture, one tenant you will need to embrace is automation. Many moving parts are introduced with this style of architecture. If successful, your environment will have a plethora of service APIs available that the enterprise can consume for application development and integration.

This means that there must be a way that available API documentation can be discovered. API information needs to be effectively communicated throughout the enterprise that shows where APIs are used, how often APIs are used, and when APIs change. Not having this type of monitoring in place will hinder and possibly cripple the agility benefits that a Microservice style of architecture can bring to the enterprise.

This blog will describe how Swagger/OpenAPI documentation can be applied to a Spring Boot implementation. We will show how API documentation and monitoring can be automatically published to an API documentation portal.

As an example, we introduce a reference Spring Boot API CRUD application (using Spring MVC/Data with Spring Fox) and set up the automatic publishing of API documentation and statistics to documentation portal GrokOla. In the example, we introduce two open source utilities to help and allow published APIs the ability to be searched and notify users when changed….

Spring Boot – The Right Boot For You!

Matt McCandless Articles, Development Technologies & Tools, Java, Spring, Spring Boot, Tutorial 1 Comment

Need a little spring in your step? Tired of all those heavy web servers and deploying WAR files? Well you’re in luck.

Spring Boot takes an opinionated view of building production-ready Spring applications. Spring Boot favors convention over configuration and is designed to get you up and running as quickly as possible.

The aim of this blog is just to get you familiar with how to get Spring Boot going on your machine. It is going to be fairly straightforward and vanilla. The goal is to get you started…