Bean Articles
2 articles about Bean. Explore Spring Boot implementation, design, and operations across related topics.
-
Introduction to Spring @Bean 'Names' - When Should You Set One? How Does It Work? What's the Priority?
When developing with Spring Boot, you often have opportunities to use @Bean. One thing that can be subtly tricky is the question of 'Should I give this @Bean a name, or just leave it alone?' This article organizes, from a practical perspective, what @Bean names are used for, when you should explicitly set one, and even 'which one gets chosen (priority)' when multiple Beans exist.
-
What is @Configuration / @Bean in Spring Boot? A Clear Guide to How to Use Them
Have you ever come across @Configuration or @Bean while developing with Spring Boot? These are points that tend to cause confusion, such as 'What's the difference from @Component?' and 'Where is the correct place to use them?' This article explains the roles and usage of @Configuration/@Bean with concrete examples.