Execute around Aspect with @annotation pointcut in Spring Boot

Aspect oriented programming (AOP) is a programming model where we write independently executable code which adds additional behavior to the existing code without modifying the existing code. Wikipedia defines AOP as: In this article, I will show you how to execute certain code around the execution of a method which means I would execute some … Read more

Testing the File Upload API in Spring Boot

In one of my previous post, I had created an API to upload file. In this post I will write a JUnit test to test the API. We will test the complete flow right from uploading till it is copied to the file system and then we will also see how to mock the FileService … Read more

Sample Logback Configuration for Spring Boot Profile Based Logging

We would want different logging configurations for different profiles in Spring Boot, like in local running we would just want console logging and for production, we would want file logging with support for rolling the log files daily. I came up with a sample logback configuration which I use in all my applications. Create a … Read more

Using Google reCaptcha with Spring Boot application

Introduction reCaptcha by Google is a library used to prevent bots from submitting data to your public forms or accessing your public data. In this post, we will look at how to integrate reCaptcha with a Spring Boot based web application Setting up reCaptcha You should create an API key from admin panel. You have … Read more

%d bloggers like this: