Using Amazon ElastiCache for Redis To Optimize Your Spring Boot Application

Brandon Klimek AWS, Java, Spring, Spring Boot, Technology Snapshot 1 Comment

Has your project gotten to the point when big data sets and/or time-consuming calculations have begun to affect performance? Or are you struggling to optimize your queries and need to cache some information to avoid continually hitting your database? Then caching could be your solution.

For this article, I will demonstrate how to utilize Amazon ElastiCache for Redis to speed up areas of your application. The example application we will build uses Spring Boot 2.x and is available on Github.

Reading and Writing from Excel in Spring Batch

Rik Scarborough Java, Spring, Spring Batch, Technology Snapshot, Tutorial Leave a Comment

We have discussed many different ways to read and write data in Spring Batch. The framework comes with quite an assortment of Readers and Writers that can be used directly or reused in some manner. Most of the time, the requirements consist of reading the data from some type of text file or database.

So what happens when the business we are supporting asks for something out of the ordinary, such as reading an Excel file and outputting the data to another Excel file? Typically the off-the-cuff response would be, “can you convert it to a CSV or other delimited text file?” Or “You know, Excel will read a CSV file just fine.” Sometimes that works, and sometimes the business requirements do not allow that type of flexibility.

Consider this scenario; in these days of Cloud and other online computing, the input file is likely created by a server that the company has no direct access to as far as programming. The file it creates is in one format, Excel. The output of your process has to go before several executives or other business clients and needs to be formatted in a professional looking manner. Adding a manual process to import a CSV and format it diminishes the value of using Spring Batch.

For the sake of the honor of the coding profession, you agree to the requirement to read and write from an Excel file directly. Now, how do you do that?…

Spring Boot Profiles: A Strategic Way to Configure Applications

Greg Rice Java, Spring, Spring Boot, Technology Snapshot 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…