{"id":15236,"date":"2025-03-15T10:45:12","date_gmt":"2025-03-15T07:45:12","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/"},"modified":"2025-03-15T10:45:12","modified_gmt":"2025-03-15T07:45:12","slug":"spring-bootta-bean-annotasyonu-detayli-anlatim","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/","title":{"rendered":"Spring Boot&#8217;ta @Bean Annotasyonu: Detayl\u0131 Anlat\u0131m"},"content":{"rendered":"<p><body><\/p>\n<p>Spring Boot&#8217;ta @Bean Annotasyonu: Detayl\u0131 Anlat\u0131m<\/p>\n<p>Merhaba!  Bu makalede, Spring Boot uygulamalar\u0131nda s\u0131k\u00e7a kullan\u0131lan ve olduk\u00e7a g\u00fc\u00e7l\u00fc bir ara\u00e7 olan <code>@Bean<\/code> annotasyonunu detayl\u0131 bir \u015fekilde inceleyece\u011fiz.  <code>@Bean<\/code> annotasyonunun ne i\u015fe yarad\u0131\u011f\u0131n\u0131, nas\u0131l kullan\u0131ld\u0131\u011f\u0131n\u0131 ve avantajlar\u0131n\u0131 \u00f6rneklerle a\u00e7\u0131klayaca\u011f\u0131z.  \u00d6ncelikle, Spring&#8217;in temel prensiplerinden biri olan Inversion of Control (IoC) veya Dependency Injection (DI)&#8217;\u0131 anlamak \u00f6nemlidir.  K\u0131saca IoC, nesnelerin ba\u011f\u0131ml\u0131l\u0131klar\u0131n\u0131 kendilerinin y\u00f6netmesi yerine, bir kapsay\u0131c\u0131 (container) taraf\u0131ndan y\u00f6netilmesi anlam\u0131na gelir.  Bu da kodun daha mod\u00fcler, test edilebilir ve s\u00fcrd\u00fcr\u00fclebilir olmas\u0131n\u0131 sa\u011flar.<\/p>\n<p>Peki <code>@Bean<\/code> annotasyonu bu s\u00fcre\u00e7te nas\u0131l rol oynuyor?  <code>@Bean<\/code> annotasyonu, Spring kapsay\u0131c\u0131s\u0131na kendi nesnelerimizi (bean&#8217;ler) tan\u0131mlamam\u0131z\u0131 sa\u011flar.  Bu nesneler daha sonra, di\u011fer s\u0131n\u0131flar taraf\u0131ndan ba\u011f\u0131ml\u0131l\u0131k enjeksiyonu yoluyla kullan\u0131labilir.  Bu sayede, kodumuzda do\u011frudan nesne olu\u015fturmak yerine, Spring&#8217;in bu i\u015flemi y\u00f6netmesini sa\u011flar\u0131z.  Sonu\u00e7 olarak, daha temiz ve daha iyi yap\u0131land\u0131r\u0131lm\u0131\u015f bir kod elde ederiz.<\/p>\n<h2>@Bean Annotasyonunun Kullan\u0131m\u0131<\/h2>\n<p><code>@Bean<\/code> annotasyonu, bir metodun \u00fczerine eklenerek kullan\u0131l\u0131r.  Bu metot, Spring kapsay\u0131c\u0131s\u0131 taraf\u0131ndan \u00e7a\u011fr\u0131l\u0131r ve metot taraf\u0131ndan d\u00f6nd\u00fcr\u00fclen nesne, bir bean olarak kaydedilir.  \u0130\u015fte basit bir \u00f6rnek:<\/p>\n<pre><code class=\"language-java\">\n@Configuration\npublic class MyConfig {\n\n    @Bean\n    public MyService myService() {\n        return new MyService();\n    }\n}\n<\/code><\/pre>\n<p>Bu \u00f6rnekte, <code>MyConfig<\/code> s\u0131n\u0131f\u0131 i\u00e7inde <code>myService<\/code> metodu, <code>@Bean<\/code> annotasyonu ile i\u015faretlenmi\u015ftir.  Bu metot, bir <code>MyService<\/code> nesnesi olu\u015fturur ve Spring kapsay\u0131c\u0131s\u0131na verir.  <code>@Configuration<\/code> annotasyonu ise bu s\u0131n\u0131f\u0131n bir konfig\u00fcrasyon s\u0131n\u0131f\u0131 oldu\u011funu belirtir.<\/p>\n<h2>Bean&#8217;lerin Ba\u011f\u0131ml\u0131l\u0131k Enjeksiyonu ile Kullan\u0131m\u0131<\/h2>\n<p>Olu\u015fturdu\u011fumuz <code>MyService<\/code> bean&#8217;ini, di\u011fer s\u0131n\u0131flar taraf\u0131ndan ba\u011f\u0131ml\u0131l\u0131k enjeksiyonu ile kullanabiliriz.  \u00d6rne\u011fin:<\/p>\n<pre><code class=\"language-java\">\n@Service\npublic class MyOtherService {\n\n    private final MyService myService;\n\n    @Autowired\n    public MyOtherService(MyService myService) {\n        this.myService = myService;\n    }\n\n    \/\/ MyService'i kullanarak i\u015flemler\n}\n<\/code><\/pre>\n<p>Burada, <code>MyOtherService<\/code> s\u0131n\u0131f\u0131, <code>MyService<\/code>&#8216;e ba\u011f\u0131ml\u0131d\u0131r.  <code>@Autowired<\/code> annotasyonu, Spring&#8217;in <code>MyService<\/code> bean&#8217;ini <code>MyOtherService<\/code> s\u0131n\u0131f\u0131na enjekte etmesini sa\u011flar.  Bu sayede, <code>MyOtherService<\/code> s\u0131n\u0131f\u0131, <code>MyService<\/code> nesnesini do\u011frudan olu\u015fturmak zorunda kalmaz.<\/p>\n<h2>Avantajlar\u0131<\/h2>\n<p><code>@Bean<\/code> annotasyonunun kullan\u0131lmas\u0131n\u0131n bir\u00e7ok avantaj\u0131 vard\u0131r:<\/p>\n<p>* **Kodun daha okunabilir ve s\u00fcrd\u00fcr\u00fclebilir olmas\u0131n\u0131 sa\u011flar.**<br \/>\n* **Ba\u011f\u0131ml\u0131l\u0131klar\u0131 y\u00f6netmeyi kolayla\u015ft\u0131r\u0131r.**<br \/>\n* **Test edilebilirli\u011fi art\u0131r\u0131r.**<br \/>\n* **Kodun daha mod\u00fcler olmas\u0131n\u0131 sa\u011flar.**<br \/>\n* **Spring kapsay\u0131c\u0131s\u0131 taraf\u0131ndan y\u00f6netilen nesnelerin ya\u015fam d\u00f6ng\u00fcs\u00fcn\u00fc kontrol etmemizi sa\u011flar.<\/p>\n<h2>Sonu\u00e7<\/h2>\n<p><code>@Bean<\/code> annotasyonu, Spring Boot uygulamalar\u0131nda g\u00fc\u00e7l\u00fc bir ara\u00e7t\u0131r.  Bu annotasyonu kullanarak, kendi bean&#8217;lerimizi tan\u0131mlayabilir ve ba\u011f\u0131ml\u0131l\u0131k enjeksiyonu ile bunlar\u0131 di\u011fer s\u0131n\u0131flar taraf\u0131ndan kullanabiliriz.  Bu sayede, kodumuz daha temiz, daha okunabilir ve daha s\u00fcrd\u00fcr\u00fclebilir hale gelir.  Daha fazla bilgi i\u00e7in  <a href=\"https:\/\/fatihsoysal.com\" target=\"_blank\">fatihsoysal.com<\/a> adresini ziyaret edebilirsiniz.  Ayr\u0131ca, Spring Boot dok\u00fcmantasyonunu da inceleyebilirsiniz: <a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/current\/reference\/htmlsingle\/\" target=\"_blank\">Spring Boot Dok\u00fcmantasyonu<\/a><\/p>\n<p>#Etiketler: Spring Boot, @Bean, Annotasyon, Ba\u011f\u0131ml\u0131l\u0131k Enjeksiyonu, IoC, Bean Tan\u0131mlama, Spring Framework, Java<\/p>\n<p><\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"Spring Boot&#8217;ta @Bean Annotasyonu: Detayl\u0131 Anlat\u0131m Merhaba! Bu makalede, Spring Boot uygulamalar\u0131nda s\u0131k\u00e7a kullan\u0131lan ve olduk\u00e7a g\u00fc\u00e7l\u00fc bir&hellip;","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_page_header_type":"","csco_page_load_nextpost":"","csco_page_subscribe_form":"","csco_page_contact_form":"","footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-15236","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-genel","7":"cs-entry","8":"cs-video-wrap"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.5 (Yoast SEO v25.3.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Spring Boot&#039;ta @Bean Annotasyonu: Detayl\u0131 Anlat\u0131m<\/title>\n<meta name=\"description\" content=\"Merhaba! Bu makalede, Spring Boot uygulamalar\u0131nda s\u0131k\u00e7a kullan\u0131lan ve olduk\u00e7a g\u00fc\u00e7l\u00fc bir ara\u00e7 olan @Bean annotasyonunu detayl\u0131 bir \u015fekilde inceleyece\u011fiz. @Bean annotasyonunun ne i\u015fe yarad\u0131\u011f\u0131n\u0131, nas\u0131l kullan\u0131ld\u0131\u011f\u0131n\u0131 ve avantajlar\u0131n\u0131 \u00f6rneklerle a\u00e7\u0131klayaca\u011f\u0131z. \u00d6ncelikle, Spring&#039;in temel prensiplerinden biri olan Inversion of Control (IoC) veya Dependency Injection (DI)&#039;\u0131 anlamak \u00f6nemlidir. K\u0131saca IoC, nesnelerin ba\u011f\u0131ml\u0131l\u0131klar\u0131n\u0131 kendilerinin y\u00f6netmesi yerine, bir kapsay\u0131c\u0131 (container) taraf\u0131ndan y\u00f6netilmesi anlam\u0131na gelir. Bu da kodun daha mod\u00fcler, test edilebilir ve s\u00fcrd\u00fcr\u00fclebilir olmas\u0131n\u0131 sa\u011flar.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Boot&#039;ta @Bean Annotasyonu: Detayl\u0131 Anlat\u0131m\" \/>\n<meta property=\"og:description\" content=\"Merhaba! Bu makalede, Spring Boot uygulamalar\u0131nda s\u0131k\u00e7a kullan\u0131lan ve olduk\u00e7a g\u00fc\u00e7l\u00fc bir ara\u00e7 olan @Bean annotasyonunu detayl\u0131 bir \u015fekilde inceleyece\u011fiz. @Bean annotasyonunun ne i\u015fe yarad\u0131\u011f\u0131n\u0131, nas\u0131l kullan\u0131ld\u0131\u011f\u0131n\u0131 ve avantajlar\u0131n\u0131 \u00f6rneklerle a\u00e7\u0131klayaca\u011f\u0131z. \u00d6ncelikle, Spring&#039;in temel prensiplerinden biri olan Inversion of Control (IoC) veya Dependency Injection (DI)&#039;\u0131 anlamak \u00f6nemlidir. K\u0131saca IoC, nesnelerin ba\u011f\u0131ml\u0131l\u0131klar\u0131n\u0131 kendilerinin y\u00f6netmesi yerine, bir kapsay\u0131c\u0131 (container) taraf\u0131ndan y\u00f6netilmesi anlam\u0131na gelir. Bu da kodun daha mod\u00fcler, test edilebilir ve s\u00fcrd\u00fcr\u00fclebilir olmas\u0131n\u0131 sa\u011flar.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-15T07:45:12+00:00\" \/>\n<meta name=\"author\" content=\"Fatih Soysal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatih Soysal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"Spring Boot&#8217;ta @Bean Annotasyonu: Detayl\u0131 Anlat\u0131m\",\"datePublished\":\"2025-03-15T07:45:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/\"},\"wordCount\":500,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/#respond\"]}],\"copyrightYear\":\"2025\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/\",\"name\":\"Spring Boot'ta @Bean Annotasyonu: Detayl\u0131 Anlat\u0131m\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2025-03-15T07:45:12+00:00\",\"description\":\"Merhaba! Bu makalede, Spring Boot uygulamalar\u0131nda s\u0131k\u00e7a kullan\u0131lan ve olduk\u00e7a g\u00fc\u00e7l\u00fc bir ara\u00e7 olan @Bean annotasyonunu detayl\u0131 bir \u015fekilde inceleyece\u011fiz. @Bean annotasyonunun ne i\u015fe yarad\u0131\u011f\u0131n\u0131, nas\u0131l kullan\u0131ld\u0131\u011f\u0131n\u0131 ve avantajlar\u0131n\u0131 \u00f6rneklerle a\u00e7\u0131klayaca\u011f\u0131z. \u00d6ncelikle, Spring'in temel prensiplerinden biri olan Inversion of Control (IoC) veya Dependency Injection (DI)'\u0131 anlamak \u00f6nemlidir. K\u0131saca IoC, nesnelerin ba\u011f\u0131ml\u0131l\u0131klar\u0131n\u0131 kendilerinin y\u00f6netmesi yerine, bir kapsay\u0131c\u0131 (container) taraf\u0131ndan y\u00f6netilmesi anlam\u0131na gelir. Bu da kodun daha mod\u00fcler, test edilebilir ve s\u00fcrd\u00fcr\u00fclebilir olmas\u0131n\u0131 sa\u011flar.\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spring Boot&#8217;ta @Bean Annotasyonu: Detayl\u0131 Anlat\u0131m\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/\",\"name\":\"Fatihsoysal.com\",\"description\":\"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim\",\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\",\"name\":\"Fatih Soysal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"contentUrl\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"width\":512,\"height\":512,\"caption\":\"Fatih Soysal\"},\"logo\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Spring Boot'ta @Bean Annotasyonu: Detayl\u0131 Anlat\u0131m","description":"Merhaba! Bu makalede, Spring Boot uygulamalar\u0131nda s\u0131k\u00e7a kullan\u0131lan ve olduk\u00e7a g\u00fc\u00e7l\u00fc bir ara\u00e7 olan @Bean annotasyonunu detayl\u0131 bir \u015fekilde inceleyece\u011fiz. @Bean annotasyonunun ne i\u015fe yarad\u0131\u011f\u0131n\u0131, nas\u0131l kullan\u0131ld\u0131\u011f\u0131n\u0131 ve avantajlar\u0131n\u0131 \u00f6rneklerle a\u00e7\u0131klayaca\u011f\u0131z. \u00d6ncelikle, Spring'in temel prensiplerinden biri olan Inversion of Control (IoC) veya Dependency Injection (DI)'\u0131 anlamak \u00f6nemlidir. K\u0131saca IoC, nesnelerin ba\u011f\u0131ml\u0131l\u0131klar\u0131n\u0131 kendilerinin y\u00f6netmesi yerine, bir kapsay\u0131c\u0131 (container) taraf\u0131ndan y\u00f6netilmesi anlam\u0131na gelir. Bu da kodun daha mod\u00fcler, test edilebilir ve s\u00fcrd\u00fcr\u00fclebilir olmas\u0131n\u0131 sa\u011flar.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/","og_locale":"tr_TR","og_type":"article","og_title":"Spring Boot'ta @Bean Annotasyonu: Detayl\u0131 Anlat\u0131m","og_description":"Merhaba! Bu makalede, Spring Boot uygulamalar\u0131nda s\u0131k\u00e7a kullan\u0131lan ve olduk\u00e7a g\u00fc\u00e7l\u00fc bir ara\u00e7 olan @Bean annotasyonunu detayl\u0131 bir \u015fekilde inceleyece\u011fiz. @Bean annotasyonunun ne i\u015fe yarad\u0131\u011f\u0131n\u0131, nas\u0131l kullan\u0131ld\u0131\u011f\u0131n\u0131 ve avantajlar\u0131n\u0131 \u00f6rneklerle a\u00e7\u0131klayaca\u011f\u0131z. \u00d6ncelikle, Spring'in temel prensiplerinden biri olan Inversion of Control (IoC) veya Dependency Injection (DI)'\u0131 anlamak \u00f6nemlidir. K\u0131saca IoC, nesnelerin ba\u011f\u0131ml\u0131l\u0131klar\u0131n\u0131 kendilerinin y\u00f6netmesi yerine, bir kapsay\u0131c\u0131 (container) taraf\u0131ndan y\u00f6netilmesi anlam\u0131na gelir. Bu da kodun daha mod\u00fcler, test edilebilir ve s\u00fcrd\u00fcr\u00fclebilir olmas\u0131n\u0131 sa\u011flar.","og_url":"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2025-03-15T07:45:12+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"3 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"Spring Boot&#8217;ta @Bean Annotasyonu: Detayl\u0131 Anlat\u0131m","datePublished":"2025-03-15T07:45:12+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/"},"wordCount":500,"commentCount":0,"publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/#respond"]}],"copyrightYear":"2025","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/","url":"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/","name":"Spring Boot'ta @Bean Annotasyonu: Detayl\u0131 Anlat\u0131m","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2025-03-15T07:45:12+00:00","description":"Merhaba! Bu makalede, Spring Boot uygulamalar\u0131nda s\u0131k\u00e7a kullan\u0131lan ve olduk\u00e7a g\u00fc\u00e7l\u00fc bir ara\u00e7 olan @Bean annotasyonunu detayl\u0131 bir \u015fekilde inceleyece\u011fiz. @Bean annotasyonunun ne i\u015fe yarad\u0131\u011f\u0131n\u0131, nas\u0131l kullan\u0131ld\u0131\u011f\u0131n\u0131 ve avantajlar\u0131n\u0131 \u00f6rneklerle a\u00e7\u0131klayaca\u011f\u0131z. \u00d6ncelikle, Spring'in temel prensiplerinden biri olan Inversion of Control (IoC) veya Dependency Injection (DI)'\u0131 anlamak \u00f6nemlidir. K\u0131saca IoC, nesnelerin ba\u011f\u0131ml\u0131l\u0131klar\u0131n\u0131 kendilerinin y\u00f6netmesi yerine, bir kapsay\u0131c\u0131 (container) taraf\u0131ndan y\u00f6netilmesi anlam\u0131na gelir. Bu da kodun daha mod\u00fcler, test edilebilir ve s\u00fcrd\u00fcr\u00fclebilir olmas\u0131n\u0131 sa\u011flar.","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/spring-bootta-bean-annotasyonu-detayli-anlatim\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Spring Boot&#8217;ta @Bean Annotasyonu: Detayl\u0131 Anlat\u0131m"}]},{"@type":"WebSite","@id":"https:\/\/fatihsoysal.com\/blog\/#website","url":"https:\/\/fatihsoysal.com\/blog\/","name":"Fatihsoysal.com","description":"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim","publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1","name":"Fatih Soysal","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","contentUrl":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","width":512,"height":512,"caption":"Fatih Soysal"},"logo":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/"},"description":"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.","url":"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/"}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/15236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/comments?post=15236"}],"version-history":[{"count":0,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/15236\/revisions"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=15236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=15236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=15236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}