Author: Sergey Kargopolov

I’m a software developer with a passion for teaching. I’ve written lots of articles for AppsDeveloperBlog.com and made plenty of video tutorials on my YouTube channel(https://youtube.com/@SergeyKargopolov). If you want to dive deeper, I’ve also got some courses on Udemy(https://www.udemy.com/user/sergeykargopolov/) you might like.

When I’m not coding, I love to travel. I also share my travel adventures over at TravelLocalCanada.com. Hope to see you around on one of these platforms!

Web: www.appsdeveloperblog.com

In this blog post, I will share the Spring annotations used to map HTTP requests to specific handler methods. These annotations include @PostMapping, @GetMapping, @PutMapping, and @DeleteMapping. While most Spring Boot applications use the @RequestMapping annotation, which I will also cover in this post, I’ll begin with the newer shortcut annotations that have been available…

Read More Spring Annotations @PostMapping, @GetMapping, @PutMapping and @DeleteMapping

In this Spring Security tutorial, you will learn how to enable and use the Method Level Security with a @Secured annotation. @Secured is a Spring Security annotation used to specify that a method should be executed only if the authenticated user has the required roles or authorities. When you use this annotation, you can specify…

Read More Spring Security @Secured: Method-Level Protection

In this Spring Boot Security tutorial, you will learn how to use Spring method-level security to secure RestController methods with @PreAuthorize annotation. If you are interested in video lessons, then I also show how to create user Roles and Authorities and how to use Spring Method Level Security annotations in my video course: RESTful Web…

Read More Spring Method-Level Security with @PreAuthorize

In this Java tutorial, I am going to share with you different ways how to generate a random string of characters. You will learn to generate the following types of random Strings of characters: alpha-numeric String of characters of any length or of a specific length, Letters only, Numbers only. I hope you will find…

Read More Random String of Characters in Java. Different Examples.

This tutorial will teach you how to retrieve URI path variables in your Spring MVC web application. Define Path Variable To define a path variable in the URI path, we use curly brackets. For example, the @GetMapping annotation below specifies one path variable called userId, which is surrounded by curly brackets. @GetMapping(path=”/users/{userId}”) @PathVariable Annotation To…

Read More Spring MVC: Reading URI Path Variables

This tutorial will guide you on how to incorporate JUnit support into your Spring Boot application based on Maven. Spring Boot Starter Test Dependency To add JUnit and Mockito support to your Maven-based Spring Boot application, include the following dependencies in the <dependencies> section of your pom.xml file: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> By adding…

Read More JUnit Support in Spring Boot

In this tutorial, we will generate a random alpha-numeric string of characters, which can be used as a user password. Password Requirements When generating passwords, it’s important to set requirements that make them strong and difficult to guess. Here are some guidelines to follow when creating password requirements: Length The length of a password is…

Read More Generate Secure Password in Java