AY

Ayush Shrivastava

48
Articles

Content by Ayush Shrivastava

48 articles found

@PathVariable in Spring Boot: How to Use It, With Examples
Java
7 min read

@PathVariable in Spring Boot: How to Use It, With Examples

How to use @PathVariable in Spring Boot, with runnable examples covering multiple variables, optional values, regex patterns, type conversion errors, validation, and when to use @RequestParam instead.

8/13/2026
Mastering Spring Security 7 with Spring Boot 4 and Java 21 – Part 8.2: Custom OAuth2UserService and Persisting Users in the Database

Mastering Spring Security 7 with Spring Boot 4 and Java 21 – Part 8.2: Custom OAuth2UserService and Persisting Users in the Database

After a user successfully authenticates with Google, Spring Security retrieves the user's profile information.

7/31/2026
Mastering Spring Security 7 with Spring Boot 4 and Java 21 – Part 8.1: Configuring Google OAuth2 Login in Spring Boot

Mastering Spring Security 7 with Spring Boot 4 and Java 21 – Part 8.1: Configuring Google OAuth2 Login in Spring Boot

Google acts as the Authorization Server, while your Spring Boot application acts as the OAuth2 Client.

7/30/2026
Mastering Spring Security 7 with Spring Boot 4 and Java 21 – Part 8: OAuth2 Login, Social Authentication, and OpenID Connect

Mastering Spring Security 7 with Spring Boot 4 and Java 21 – Part 8: OAuth2 Login, Social Authentication, and OpenID Connect

Spring Security provides built-in support for OAuth2 and OpenID Connect (OIDC), making it straightforward to integrate third-party identity providers into Spring Boot applications.

7/29/2026
Mastering Spring Security 7 with Spring Boot 4 and Java 21 – Part 7: JWT Authentication and Authorization for Secure REST APIs

Mastering Spring Security 7 with Spring Boot 4 and Java 21 – Part 7: JWT Authentication and Authorization for Secure REST APIs

In this article, we will build a complete JWT-based authentication system using Spring Security 7, Spring Boot 4, and Java 21.

7/27/2026
Mastering Spring Security 7 with Spring Boot 4 and Java 21 – Part 6: Method-Level Security with @PreAuthorize, @PostAuthorize, and @Secured

Mastering Spring Security 7 with Spring Boot 4 and Java 21 – Part 6: Method-Level Security with @PreAuthorize, @PostAuthorize, and @Secured

In this article, we will learn how to implement method-level security in Spring Security 7 using Spring Boot 4 and Java 21.

7/21/2026

Follow Ayush Shrivastava

Stay updated with Ayush Shrivastava's latest articles and insights on backend development.