Spring Profiles, application.properties, application.yaml, @Value, and @ConfigurationProperties

Опубликовано: 02 Март 2026
на канале: The Curious Coder
729
39

🚀 Spring Boot Configuration Deep Dive | Spring Profiles, application.properties, application.yaml, @Value, @ConfigurationProperties

In this comprehensive video, we explain Spring Boot configuration in detail — including Spring Profiles, the application.properties and application.yaml files, and annotations like @Value and @ConfigurationProperties

Spring Profiles are essential feature in Spring Boot. By using profiles, you can tailor your application’s behaviour to different environments like development, testing, or production. We discuss how profiles in Spring Boot work, and how to leverage @Profile in Spring Boot projects. You’ll also learn how to organize and load environment-specific files like application-dev.yml and application-prod.properties.

There’s a lot of confusion around application.properties vs application.yml—this video explains the differences and when to prefer one over the other. You'll also gain clarity on concepts like reading values from the application.properties file, using structured configuration in application.yaml, and injecting those values into your Spring components.

This tutorial explains the use of @Value and @ConfigurationProperties in Spring Boot with practical examples. You'll see how values can be injected from property files into your code and how to use @ConfigurationProperties annotation effectively. If you're curious about the difference between @Value vs @ConfigurationProperties, or when to use each, this video breaks it down clearly.

If you’ve ever wondered how to configure the port in a Spring Boot application, how to use property files correctly, or how to use Spring Boot’s configuration system for real-world scenarios, this video will answer your questions. It’s ideal for developers looking to strengthen their understanding of Spring Boot application configuration.

This video covers essential Spring Boot topics like: @Value annotation in Spring Boot, @ConfigurationProperties Spring Boot, how to use profiles in Spring Boot, Spring Boot properties, Spring Boot profiles yaml, environment reference, and more. Whether you're managing configuration with annotations like @Value and @ConfigurationProperties or simply trying to read from your application.properties file in Spring Boot, you’ll find practical guidance here.

00:00 : Introduction
00:16 : Topics to be covered
01:24 : What are Environment Properties ?
02:45 : Environment Properties Configuration : Hands-On !
05:32 : Approach 1 : Configuring application using External Properties File
08:18 : Drawback of Using External Properties File
09:34 : Approach 2 : Configuring application using Spring Profiles
22:17 : Use of @Profile annotation
25:03 : What’s the need for application.yaml File?
25:28 : 1st Diff - Structured Indentation
27:21 : 2nd Diff - MultiDocument File
33:12 : Configuring Custom Environment Properties
35:15 : @Value annotation
39:01 : Configuring multiple Environment Properties
43:22 : Drawback of @Value
43:50 : @ConfigurationProperties annotation
49:10 : Environment Interface
55:15 : Interview Tip of the Day !!

Youtube Video Links:

Environment Properties I
   • Spring Profiles | application.properties :...  

Environment Properties II
   • application.properties vs application.yaml...  

Environment Properties III
   • @Value | @ConfigurationProperties | Enviro...  


Instagram :
  / the.curious_coder  


#interview #springboot #java