Blog

Page 293 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Handle spring security authentication exceptions with @ExceptionHandler
springspring-mvc

Handle spring security authentication exceptions with @ExceptionHandler

Published on September 2, 2023

# Handling Spring Security Authentication Exceptions with @ExceptionHandler If you've been working with Spring MVC's `@ControllerAdvice` and `@ExceptionHandler`, you might have encountered a common problem: it works fine for exceptions thrown by web MVC c

Cover Image for What is Dependency Injection and Inversion of Control in Spring Framework?
dependenciesspring

What is Dependency Injection and Inversion of Control in Spring Framework?

Published on September 2, 2023

# ✨ Demystifying Dependency Injection and Inversion of Control in Spring Framework ✨ So, you've heard about "Dependency Injection" and "Inversion of Control" (IoC) in the Spring Framework, and you're wondering what they are all about? Don't worry, my frie

Cover Image for Is there a way to @Autowire a bean that requires constructor arguments?
constructorspring

Is there a way to @Autowire a bean that requires constructor arguments?

Published on September 2, 2023

# šŸ“ Is there a way to @Autowire a bean that requires constructor arguments? Hey there tech enthusiasts! šŸ‘‹ Today, we're going to dive into a common question that many developers using Spring encounter: Is there a way to `@Autowire` a bean that requires c

Cover Image for IntelliJ IDEA shows errors when using Spring"s @Autowired annotation
springspring-mvc

IntelliJ IDEA shows errors when using Spring"s @Autowired annotation

Published on September 2, 2023

šŸ‘‹ Hey there, fellow tech enthusiasts! šŸ˜Ž Are you using IntelliJ IDEA and encountering errors when utilizing Spring's mighty šŸ”„`@Autowired` annotation? Fret not, my friends, for I have got your back! šŸ™Œ šŸ¤” But before diving into the solutions, let's quic

Cover Image for When annotating a class with @Component, does this mean it is a Spring Bean and Singleton?
annotationsspring

When annotating a class with @Component, does this mean it is a Spring Bean and Singleton?

Published on September 2, 2023

# Title: Demystifying @Component Annotation: Is it a Spring Bean and a Singleton? ## Introduction: If you're new to Spring and find yourself grappling with questions about annotations, you're not alone! In this blog post, we'll unlock the mysteries surrou

Cover Image for Spring MVC @PathVariable getting truncated
javaspringspring-mvc

Spring MVC @PathVariable getting truncated

Published on September 2, 2023

šŸ–Šļø Hey there tech enthusiasts! šŸ‘‹ Welcome back to my tech blog! In today's post, we're going to tackle a common problem encountered by many developers when using Spring MVC's `@PathVariable` annotation. So, if you've ever faced the issue of your path vari

Cover Image for How to manage REST API versioning with spring?
javaspringspring-mvc

How to manage REST API versioning with spring?

Published on September 2, 2023

# How to Manage REST API Versioning with Spring Are you struggling to find an easy and maintainable way to manage REST API versioning using Spring? Don't worry, we've got you covered! In this blog post, we'll walk you through a common issue faced by devel

Cover Image for Autowiring two beans implementing same interface - how to set default bean to autowire?
javaspringspring-mvc

Autowiring two beans implementing same interface - how to set default bean to autowire?

Published on September 2, 2023

# šŸš€ Autowiring two beans implementing the same interface - how to set default bean to autowire? šŸ¤” Have you ever come across a situation in your Spring application where you have multiple beans implementing the same interface? And you want to set a defau

Cover Image for What is javax.inject.Named annotation supposed to be used for?
dependency-injectionjavaspring

What is javax.inject.Named annotation supposed to be used for?

Published on September 2, 2023

# The Mystery Behind `javax.inject.Named` Annotation šŸ¤” Have you ever stumbled upon the `javax.inject.Named` annotation and wondered what it is used for? šŸ¤·ā€ā™€ļø Fear not, for today we are going to unravel this mystery and provide you with a complete guide

Cover Image for Spring Data JPA map the native query result to Non-Entity POJO
hibernatejpaspringspring-data

Spring Data JPA map the native query result to Non-Entity POJO

Published on September 2, 2023

šŸ“ Spring Data JPA: Mapping Native Query Results to Non-Entity POJOs 🌱 Have you ever faced the challenge of mapping the result of a native query to a Non-Entity POJO in Spring Data JPA? Fear not! In this blog post, we will explore common issues and provi