JWT Token Authentication in Spring Boot Microservices
Spring Framework Guru Blog
by SFG Contributor
1y ago
Spring Boot Microservices requires authentication of users, and one way is through JSON Web Token (JWT). JWT is an open standard (RFC 7519) that defines a compact mechanism for securely transmitting information between parties. In this post, I will explain how to implement JWT authentication in Spring Microservices. JWT Token Overview JWT is of relatively small size. Therefore it can be sent through a URL, : Through a POST parameter, or Inside an HTTP header. However, take note that sending tokens through HTTP headers is the most common approach. A JWT token contains all the required informa ..read more
Visit website
Database Migration with Flyway
Spring Framework Guru Blog
by SFG Contributor
1y ago
With techniques such as continuous delivery becoming more mainstream, automated database migrations are a baseline capability for many software teams. Flyway is a tool that anyone with basic knowledge of SQL can use to set up and maintain database schemas. Database migration with Flyway is gaining high traction in the industry primarily due to its simplicity and its ability to seamlessly integrates with your application lifecycle. Using Flyway, you can: Create a new database Hold history of migrations Have a reproducible state of the database Help manage changes being applied to numerous data ..read more
Visit website
Eureka Service Registry
Spring Framework Guru Blog
by SFG Contributor
2y ago
Distributed Microservices Systems typically comprise a large number of smaller services. These services communicate with each other to perform operations. In order to communicate, one service needs the address of the other service to call. However, service addresses are dynamic in modern microservices systems. For example, if a service is running on one IP and listening to a specific port gets unhealthy, another service will automatically spin up at a different IP listening on a different port to take its place.  But the challenge is – if the caller service is hardcoded with the address o ..read more
Visit website
What is New in Java 17?
Spring Framework Guru Blog
by SFG Contributor
2y ago
In September 2021, Java 17 was released as the latest LTS (long-term support) replacing Java 11. Now the big question is “What is new in Java 17?” Java 17 has 14 JDK Enhancement Proposals (JEP) items. Out of those, there are 10 new features, 2 feature removals, and deprecation of 2 features. In this post, I will cover the key new features of Java 17 applicable to application developers. I will also list the features that have been removed and the deprecated features. New Features Some of the key new features of Java 17 for application developers are: Sealed classes and interfaces Pattern matc ..read more
Visit website
Spring for Apache Kafka
Spring Framework Guru Blog
by SFG Contributor
2y ago
Apache Kafka is an open-source Message Bus that solves the problem of how microservices communicate with each other. Spring for Apache Kafka, also known as spring-kafka. It is a  project that applies core Spring concepts to Kafka-based messaging solutions. Spring-kafka provides templates as high-level abstractions to send and consume messages asynchronously. In this post, you will learn how to use Spring for Apache Kafka in a Spring Boot application to perform asynchronous messaging. Installation Install Apache Kafka. Download any stable version of Kafka from here. Unpack the downloaded ..read more
Visit website
Getting Ready for Spring Framework 6
Spring Framework Guru Blog
by SFG Contributor
2y ago
On December 16th, 2021, with the announcement from the Spring Team, the next major release is Spring Framework 6. The whole objective is to cover Spring’s baseline upgrade efforts, in particular requiring JDK 17+ and migrating to the Jakarta EE 9 APIs, So we should be Getting Ready for upgrading to Spring Framework 6. Important Note from the Official Doc of Java 17: “These older versions of the JDK are provided to help developers debug issues in older systems. They are not updated with the latest security patches and are not recommended for use in production.” So what does this means for us as ..read more
Visit website
Using Filters in Spring Web Applications
Spring Framework Guru Blog
by SFG Contributor
2y ago
Spring Web applications and RESTful services contain controllers responsible to process requests and send back responses. At times you might need to perform certain operations on client requests before it reaches the controller. Similarly, you might need to perform operations on responses sent back by controllers to clients. You can achieve this using filters in Spring Web applications. Filters are implementations of the Filter interface of Java EE. Spring brings in its own filter implementation with the GenericFilterBean abstract class. Some of the common use cases of filters are: Logging re ..read more
Visit website
Spring Boot CLI
Spring Framework Guru Blog
by SFG Contributor
2y ago
The Spring Boot CLI (Command Line Interface) is a command-line tool that you can use to run and test Spring Boot Applications from a Terminal. The CLI is one of the fastest ways to develop a Spring-based application. How does Spring Boot CLI work? It uses Spring Boot Starter and Spring Boot AutoConfigurate components to internally resolve all dependencies and execute the application. Dependencies get resolved automatically due to the Groovy and Grape dependency manager present in the CLI. Groovy is an object-oriented dynamic programming language and Grape is a JAR dependency manager that is em ..read more
Visit website
Bootstrapping Data in Spring Boot
Spring Framework Guru Blog
by SFG Contributor
2y ago
While developing a Spring Boot Application, sometimes we need to run a piece of code at startup. This code can be anything. You might want to log certain information or run some cron jobs or send some notifications. Or you might even want to start the application with seed data in the database. In this post, We will take a look at different approaches to bootstrap a Spring Boot application during startup. Bootstrapping with Spring Boot Spring Boot offers different ways to execute logic on startup. One of the common ways is to use the CommandLineRunner Interface. Using CommandLineRunner Command ..read more
Visit website
Scheduling in Spring Boot
Spring Framework Guru Blog
by SFG Contributor
2y ago
We use scheduling to schedule jobs in a Spring Boot application. For instance, you can implement scheduling to perform some task at a specific time, or repeat after a fixed interval. In this post, you’ll learn how to use the Spring @Scheduled annotation to configure and schedule tasks. Spring Boot @Scheduled Annotation Example Let’s say you want to run a job every 5 seconds. You can achieve it by following the below steps: Step 1: @EnableScheduling annotation Add the @EnableScheduling annotation to the main class. It is a Spring Context module annotation that internally imports SchedulingConfi ..read more
Visit website

Follow Spring Framework Guru Blog on FeedSpot

Continue with Google
Continue with Apple
OR