Posts

Showing posts from 2024

Upload to AWS S3 from Java API

In this post, you will see code samples for how to upload a file to AWS S3 bucket from a Java Spring Boot app. The code you will see here is from one of my open-source repositories on Github, called document-sharing. Problem Let’s say you are building a document sharing app where you allow your users to upload the file to a public cloud solution. Now, let’s say you are building the API for your app with Spring Boot and you are using AWS S3 as your public cloud solution. How would you do that? This blog post contains the code that can help you achieve that. Read more below,  Upload to AWS S3 bucket from Java Spring Boot app - My Day To-Do (mydaytodo.com)

Spring Boot, MongoDB and reactive API

If you are a Java programmer chances are that you have worked with Spring Boot and you may or may not have heard of project reactor, WebFlux etc. In case you haven’t, then Spring Project Reactor is a spring library with which you can build Spring Reactive systems i.e. asynchronous or non-blocking APIs. This post will avoid getting into too many details for reactive systems as that topic deserves it’s own dedicated blogpost. I will write that sometime in the future. Hence, this post will focus on integration with Spring via frameworks and other implementation details. In this post you will build a reactive Spring API using WebFlux that saves data in MongoDB and manages it using Spring data-mongodb-reactive. You can read the full article below How to build a Spring Reactive API - My Day To-Do (mydaytodo.com)

Adding JWT Security to Java Spring Boot API

  JSON Web Token (JWT) pronounced “jat” is an authentication and authorization widely used in modern apps. In this mechanism, when the user logs in with their credentials, the server generates a unique key called the JWT token that it sends to the client. The client would then include the JWT token in the header when it sends a request to a protected endpoint on the server. The server would then verify the JWT token before sending a response to the client. In this tutorial, you will see code samples for how to add JWT security to Java Spring Boot API. The code samples provided here are from a sample project on Github, the link for which will be included in this post. Before starting with the code samples, it would be beneficial to understand JWT in a bit more. You can read more here How to add JWT security to Java Spring Boot API - My Day To-Do (mydaytodo.com)