Blog

Page 311 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for What is the difference between ApplicationContext and WebApplicationContext in Spring MVC?
springspring-mvc

What is the difference between ApplicationContext and WebApplicationContext in Spring MVC?

Published on September 2, 2023

🌱 What is the difference between ApplicationContext and WebApplicationContext in Spring MVC? 🌱 Spring MVC is a powerful framework for building Java web applications. It provides a modular and flexible approach to developing web applications, making it e

Cover Image for Can you use @Autowired with static fields?
javaspring

Can you use @Autowired with static fields?

Published on September 2, 2023

πŸ“πŸ”₯ **Blog Post: Can you use @Autowired with static fields?** Intro: Hey tech enthusiasts! πŸ‘‹ Have you ever wondered if you can use the mighty `@Autowired` annotation with static fields? Well, keep reading because we're going to dive into this intriguing

Cover Image for REST API - DTOs or not?
javaspring

REST API - DTOs or not?

Published on September 2, 2023

# REST API - DTOs or not? πŸ€” When it comes to creating a REST API, one of the common questions that arises is whether to use DTOs (Data Transfer Objects) or simply expose the domain model. This debate has been going on for a while, with proponents on both

Cover Image for How do I tell Spring Boot which main class to use for the executable jar?
executable-jarjavamavenspring

How do I tell Spring Boot which main class to use for the executable jar?

Published on September 2, 2023

# How to Choose the Right Main Class for Your Spring Boot Executable JAR πŸ“πŸš€ Welcome back, tech enthusiasts! Have you ever faced the issue of having multiple classes with a `main` method in your Spring Boot project? And later, encountered this error when

Cover Image for With Spring can I make an optional path variable?
spring

With Spring can I make an optional path variable?

Published on September 2, 2023

🌸 **Spring and Optional Path Variables: A Quick Guide** 🌸 Do you find yourself asking, "Can I have an optional path variable with Spring 3.0?" πŸ€” Look no further! We've got you covered with easy solutions to this common issue. Let's dive in and explore

Cover Image for How Spring Security Filter Chain works
filterspring

How Spring Security Filter Chain works

Published on September 2, 2023

# How Spring Security Filter Chain Works: Demystifying the Filters πŸ€”πŸ” So, you've heard of Spring Security's filter chain, but you're not quite sure how it works? Don't worry, my friend, I've got you covered! In this blog post, we'll break down the key f

Cover Image for What is the proper way to re-attach detached objects in Hibernate?
hibernatejavaspring

What is the proper way to re-attach detached objects in Hibernate?

Published on September 2, 2023

# The Proper Way to Re-attach Detached Objects in Hibernate πŸ€” Have you ever encountered a situation in Hibernate where you need to re-attach detached objects to a session, but you're facing errors because an object with the same identity already exists?

Cover Image for How to define a List bean in Spring?
javaspring

How to define a List bean in Spring?

Published on September 2, 2023

# How to Define a List Bean in Spring 🌱 So, you're working with Spring and you need to define a List bean? You've come to the right place! In this post, we'll walk through a common issue and provide an easy solution to help you define a List bean in your

Cover Image for Map enum in JPA with fixed values?
enumsjavajpaspring

Map enum in JPA with fixed values?

Published on September 2, 2023

# Mapping enums in JPA with fixed values πŸ—ΊοΈ Are you struggling with how to map enums with fixed values in JPA? Want to save only the integer value of each enum entry? Look no further, we've got you covered! In this blog post, we will explore different so

Cover Image for Spring Boot not serving static content
springspring-mvc

Spring Boot not serving static content

Published on September 2, 2023

## How to Solve the Issue of Spring Boot Not Serving Static Content So, you've built your Spring Boot project, added some static content, but when you run the app, it's not serving the static files properly. Frustrating, right? But fret not, because we've