Hello folks, if you are preparing for Java Developer and Spring Developer interviews then you must prepare for questions like the difference between X and Y like @bean vs @component.
In Spring, both @Component and @Bean annotations are used to register a bean in the Spring container, but they differ in the way they are used which you will find in this a…
Keep reading with a 7-day free trial
Subscribe to Javarevisited Newsletter to keep reading this post and get 7 days of free access to the full post archives.
Hello folks, if you are preparing for Java Developer and Spring Developer interviews then you must prepare for questions like the difference between X and Y like @bean vs @component.
In Spring, both @Component and @Bean annotations are used to register a bean in the Spring container, but they differ in the way they are used which you will find in this a\u2026\",\"truncated_body_text\":\"Hello folks, if you are preparing for Java Developer and Spring Developer interviews then you must prepare for questions like the difference between X and Y like @bean vs @component.\",\"wordcount\":1140,\"postTags\":[{\"id\":\"6c2a4995-e80b-465c-96e9-16b7160c80a6\",\"publication_id\":1444904,\"name\":\"Software Development\",\"slug\":\"software-development\",\"hidden\":false},{\"id\":\"7e01503d-bba6-4507-a73a-00af08a7a2d9\",\"publication_id\":1444904,\"name\":\"spring boot\",\"slug\":\"spring-boot\",\"hidden\":false},{\"id\":\"b4b68514-a3d1-4b93-8380-ddb974838634\",\"publication_id\":1444904,\"name\":\"spring\",\"slug\":\"spring\",\"hidden\":false},{\"id\":\"e0dad8ec-2ffa-433f-b37e-9e60e2568532\",\"publication_id\":1444904,\"name\":\"Tech Interview\",\"slug\":\"tech-interview\",\"hidden\":false},{\"id\":\"ec82d872-1d75-437d-97ea-37c6381e80fd\",\"publication_id\":1444904,\"name\":\"Java\",\"slug\":\"java\",\"hidden\":false}],\"postCountryBlocks\":[],\"coverImagePalette\":{\"Vibrant\":{\"rgb\":[250,123,36],\"population\":673},\"DarkVibrant\":{\"rgb\":[150,78,24],\"population\":68},\"LightVibrant\":{\"rgb\":[252,132,37],\"population\":66},\"Muted\":{\"rgb\":[144,141,110],\"population\":119},\"DarkMuted\":{\"rgb\":[67,56,39],\"population\":30},\"LightMuted\":{\"rgb\":[212,212,168],\"population\":4}},\"publishedBylines\":[{\"id\":16859097,\"name\":\"javinpaul\",\"handle\":\"javinpaul\",\"previous_name\":null,\"photo_url\":\"https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5663d1cb-2e66-4a0d-8f76-8a3aad3f2382_48x48.png\",\"bio\":\"I write a weekly newsletter to help you learn Java, coding, and system design.\",\"profile_set_up_at\":\"2023-02-16T14:56:47.646Z\",\"publicationUsers\":[{\"id\":1408967,\"user_id\":16859097,\"publication_id\":1444904,\"role\":\"admin\",\"public\":true,\"is_primary\":true,\"publication\":{\"id\":1444904,\"name\":\"Javarevisited Newsletter\",\"subdomain\":\"javarevisited\",\"custom_domain\":null,\"custom_domain_optional\":false,\"hero_text\":\"Java, Programming, and System Design interview questions and articles delivered twice a week to 35,000+ smart people.\",\"logo_url\":\"https://substack-post-media.s3.amazonaws.com/public/images/fb9abffb-bd2d-4fe4-a166-4f88de0a3cba_512x512.png\",\"author_id\":16859097,\"theme_var_background_pop\":\"#BAA049\",\"created_at\":\"2023-02-24T02:21:08.796Z\",\"rss_website_url\":null,\"email_from_name\":\"Javarevisited Newsletter\",\"copyright\":\"javinpaul\",\"founding_plan_name\":\"Founding Member\",\"community_enabled\":true,\"invite_only\":false,\"payments_state\":\"enabled\",\"language\":null,\"explicit\":false,\"is_personal_mode\":false}},{\"id\":477611,\"user_id\":16859097,\"publication_id\":547756,\"role\":\"admin\",\"public\":true,\"is_primary\":false,\"publication\":{\"id\":547756,\"name\":\"javinpaul\u2019s Newsletter\",\"subdomain\":\"javinpaul\",\"custom_domain\":null,\"custom_domain_optional\":false,\"hero_text\":\"Java, Spring Boot, DevOps, Programming and technlogy\",\"logo_url\":null,\"author_id\":16859097,\"theme_var_background_pop\":\"#B599F1\",\"created_at\":\"2021-10-30T11:05:45.362Z\",\"rss_website_url\":null,\"email_from_name\":null,\"copyright\":\"javinpaul\",\"founding_plan_name\":null,\"community_enabled\":true,\"invite_only\":false,\"payments_state\":\"disabled\",\"language\":null,\"explicit\":false,\"is_personal_mode\":false}}],\"twitter_screen_name\":\"javinpaul\",\"is_guest\":false,\"bestseller_tier\":100},{\"id\":123095996,\"name\":\"Soma\",\"handle\":\"reactjava\",\"previous_name\":null,\"photo_url\":\"https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6da5f0aa-fdd2-429c-b87f-8ac6ddf5bc60_144x144.png\",\"bio\":\"Java and React Developer\",\"profile_set_up_at\":\"2023-02-28T04:12:28.597Z\",\"is_guest\":true,\"bestseller_tier\":null,\"primaryPublicationId\":1455043,\"primaryPublicationName\":\"React Java\",\"primaryPublicationUrl\":\"https://reactjava.substack.com\",\"primaryPublicationSubscribeUrl\":\"https://reactjava.substack.com/subscribe?\"}],\"reaction\":null,\"reaction_count\":5,\"comment_count\":0,\"child_comment_count\":0,\"audio_items\":[{\"post_id\":139456466,\"voice_id\":\"en-US-JennyNeural\",\"audio_url\":null,\"type\":\"tts\",\"status\":\"paywalled\"}],\"is_geoblocked\":false,\"hidden\":true,\"hasCashtag\":false},\"comments\":[],\"canonicalUrl\":\"https://javarevisited.substack.com/p/difference-between-component-vs-bean\",\"inlineComments\":false,\"readerIsSearchCrawler\":false,\"ogUrl\":\"https://javarevisited.substack.com/p/difference-between-component-vs-bean\",\"freeTrialCoupon\":{\"id\":\"f1437b77\"},\"bannedFromNotes\":false,\"themeVariables\":{\"color_theme_bg_pop\":\"#5abb71\",\"background_pop\":\"#5abb71\",\"color_theme_bg_web\":null,\"cover_bg_color\":\"#FFFFFF\",\"background_pop_darken\":\"#49b262\",\"print_on_pop\":\"#ffffff\",\"color_theme_bg_pop_darken\":\"#49b262\",\"color_theme_print_on_pop\":\"#ffffff\",\"border_subtle\":\"rgba(204, 204, 204, 0.5)\",\"background_subtle\":\"rgba(230, 245, 234, 0.4)\",\"print_pop\":\"#5abb71\",\"color_theme_accent\":\"#5abb71\",\"cover_print_primary\":\"#363737\",\"cover_print_secondary\":\"#757575\",\"cover_print_tertiary\":\"#b6b6b6\",\"cover_border_color\":\"#5abb71\",\"home_hero\":\"newspaper\",\"home_posts\":\"list\",\"home_show_top_posts\":true,\"web_bg_color\":\"#ffffff\",\"background_contrast_1\":\"#f0f0f0\",\"color_theme_bg_contrast_1\":\"#f0f0f0\",\"background_contrast_2\":\"#dddddd\",\"color_theme_bg_contrast_2\":\"#dddddd\",\"background_contrast_3\":\"#b7b7b7\",\"color_theme_bg_contrast_3\":\"#b7b7b7\",\"background_contrast_4\":\"#929292\",\"color_theme_bg_contrast_4\":\"#929292\",\"background_contrast_5\":\"#515151\",\"color_theme_bg_contrast_5\":\"#515151\",\"color_theme_detail\":\"#e6e6e6\",\"background_contrast_pop\":\"rgba(90, 187, 113, 0.4)\",\"color_theme_bg_contrast_pop\":\"rgba(90, 187, 113, 0.4)\",\"input_background\":\"#ffffff\",\"cover_input_background\":\"#ffffff\",\"tooltip_background\":\"#191919\",\"web_bg_color_h\":\"0\",\"web_bg_color_s\":\"0%\",\"web_bg_color_l\":\"100%\",\"print_on_web_bg_color\":\"#363737\",\"print_secondary_on_web_bg_color\":\"#868787\",\"selected_comment_background_color\":\"#fdf9f3\",\"background_pop_rgb\":\"90, 187, 113\",\"background_pop_rgb_pc\":\"90 187 113\",\"color_theme_bg_pop_rgb\":\"90, 187, 113\",\"color_theme_bg_pop_rgb_pc\":\"90 187 113\",\"color_theme_accent_rgb\":\"90, 187, 113\",\"color_theme_accent_rgb_pc\":\"90 187 113\"},\"recentEpisodes\":null,\"trackFrontendVisit\":true,\"showHolidayGiftingHeader\":false,\"isChatActive\":false,\"isMeetingsActive\":false,\"hasViralGiftsCount\":0,\"features\":{},\"showCookieBanner\":false,\"disabledCookies\":[],\"dd_env\":\"prod\",\"dd_ti\":true}")