Posts

Showing posts with the label spring framework

My Introduction to Spring Security

Image
This week at work, I've been working on migrating our application to containers to shift to the cloud. We decided a good point to start would be with the Access Control application which takes care of the authentication and authorization of users to our application. Since we're a Java/Spring Boot shop, this was built upon Spring Security which led to down the rabbit hole of investigating/learning how Spring Security works and this blog page summarizes my learning. A lot of the information in this book has been taken from [1] and I highly recommend the resource to learn in-detail about Spring Security! Introduction Before we dive into Spring Security, we need to understand the difference between Authentication and Authorization. Authentication is proving who you say you are; the most common way this is done is with a username and a password. Authorization on the other hand is about what services/pages you have access to following the authentication process, this is usually hand...

Simple piece of information leads to great clarity!

Image
Greetings! I've been trying to wrap my head around the Spring framework for over a year now and it's one of the most interesting things I've discovered. Spring framework is an application framework for the Java platform and has many many features! Spring Framework Runtime The above image just shows a small subset of the Spring framework features used in Runtime. As is the norm now, the way I learn anything is to type into ChatGPT, 'Teach me ...' first before referring to more 'authoritative' sources so I did the same with the Spring Framework. Snippet of ChatGPT response for 'teach me spring' Most of the time, it ends up generating something as shown in the screenshot above recommending to create a controller with the '@Controller' annotation and return a view. ``` Java package com.example.demo.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetM...