{"id":21952,"date":"2014-02-25T19:00:47","date_gmt":"2014-02-25T17:00:47","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=21952"},"modified":"2014-02-25T08:04:25","modified_gmt":"2014-02-25T06:04:25","slug":"dependency-injection-options-for-java","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html","title":{"rendered":"Dependency Injection Options for Java"},"content":{"rendered":"<p>I wanted to take some time to put together a summary of some popular dependency injection (DI) frameworks for Java. This is a high-level overview of what\u2019s available.<\/p>\n<h2>First off, what is dependency injection?<\/h2>\n<p>\u201cDependency injection is a software design pattern that allows the removal of hard-coded dependencies and makes it possible to change them, whether at run-time or compile-time.\u201d \u2013 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Dependency_injection\" target=\"_blank\">Wikipedia<\/a><\/p>\n<p>If you\u2019ve ever had a constructor with 12 parameters, you\u2019ve already encountered a compelling reason to use dependency injection.<\/p>\n<p>Most objects require references to other objects to be useful. Dependency injection allows the system to provide those references without you having to manage all of those dependencies at the application level.<\/p>\n<p>This sounds complicated, but it\u2019s really not. Since this is not an in-depth discussion of dependency injection, <a href=\"http:\/\/en.wikipedia.org\/wiki\/Dependency_injection\" target=\"_blank\">check out the Wikipedia page<\/a> for several examples in various languages.<\/p>\n<h2>Square Dagger<\/h2>\n<p>Beginning with one of the simplest, most lightweight frameworks available, <a href=\"http:\/\/square.github.io\/dagger\/\" target=\"_blank\">Square Dagger<\/a> is a tiny library (&lt;100KB) that is useful for programs that must minimize their footprint, as in the case of mobile applications. It lacks many of the features of the larger frameworks, but it makes it up in speed and a neat compile-time validation tool.<\/p>\n<ul>\n<li><a href=\"http:\/\/square.github.io\/dagger\/\" target=\"_blank\">Square Dagger<\/a><\/li>\n<li><a href=\"http:\/\/www.joshlong.com\/jl\/blogPost\/dependency_injection_with_dagger_on_android.html\" target=\"_blank\">Dependency Injection with Dagger on Android<\/a><\/li>\n<li><a href=\"http:\/\/musingsofaprogrammingaddict.blogspot.com\/2012\/11\/dagger-new-java-dependency-injection.html\" target=\"_blank\">Dagger \u2013 A new Java dependency injection framework<\/a><\/li>\n<\/ul>\n<h2>Google Guice<\/h2>\n<p>Guice is Google\u2019s attempt to create a feature-rich, independent DI facility. It is useful in most applications, especially web development. It provides a lot more features than Dagger, but it is slower and can be complex.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<ul>\n<li><a href=\"https:\/\/code.google.com\/p\/google-guice\/wiki\/GettingStarted\" target=\"_blank\">Guice \u2013 Getting Started<\/a><\/li>\n<li><a href=\"http:\/\/discursive.com\/2011\/01\/26\/creating-a-simple-google-guice-application\/\" target=\"_blank\">Creating a simple google guice application<\/a><\/li>\n<li><a href=\"http:\/\/beust.com\/weblog\/2012\/08\/21\/advanced-dependency-injection-with-guice\/\" target=\"_blank\">Advanced dependency injection with Guice<\/a><\/li>\n<\/ul>\n<h2Spring DI<\/h2>\n<p>Spring is huge. It\u2019ll do everything for you, even write perl so that the perl can then do your laundry. Of course it has dependency injection.<\/p>\n<p>The upside is that if you are already using Spring, enabling and using DI is very easy and makes for a very well integrated approach.<\/p>\n<p>The downside is that if Spring isn\u2019t your thing or you are trying to add DI to an existing enterprise application, it may be challenging to isolate the small subset of features that you want to use.<\/p>\n<p>Spring DI can be configured either through XML or through annotations. I strongly recommend the annotated approach. It is much easier to traverse in code and can provide significant insights to developers that need to understand what\u2019s going on.<\/p>\n<ul>\n<li><a href=\"http:\/\/www.vogella.com\/tutorials\/SpringDependencyInjection\/article.html\" target=\"_blank\">Dependency Injection with the Spring Framework<\/a><\/li>\n<li><a href=\"http:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/html\/beans.html\" target=\"_blank\">The Spring IoC Container<\/a><\/li>\n<li><a href=\"http:\/\/www.dzone.com\/tutorials\/java\/spring\/spring-ioc-1.html\" target=\"_blank\">Spring IoC Tutorial<\/a><\/li>\n<\/ul>\n<h2>Java EE6 CDI<\/h2>\n<p>CDI is the Context and Dependency Injection framework that is included in Java Enterprise Edition. On the surface, it looks very similar to Spring\u2019s annotation-based DI mechanism and, in reality, it is. There are some things that it does differently under the covers, but for the most part it is attempting to solve exactly the same problems for the Java EE crowd.<\/p>\n<ul>\n<li><a href=\"http:\/\/java.dzone.com\/articles\/cdi-di-p1\" target=\"_blank\">CDI Dependency Injection Introductory Tutorial<\/a>. Note: this is a very detailed tutorial.<\/li>\n<li><a href=\"http:\/\/docs.oracle.com\/javaee\/6\/tutorial\/doc\/giwhl.html\" target=\"_blank\">Overview of CDI<\/a><\/li>\n<\/ul>\n<h2>PicoContainer<\/h2>\n<p>I mention this one last because I just came across it while poking around the internet. <a href=\"http:\/\/picocontainer.codehaus.org\/\" target=\"_blank\">PicoContainer<\/a>, like Dagger, is a very small framework that intends to do a few things very well. It doesn\u2019t have the features or complexity of Spring or CDI, and in exchange you get simplicity.<\/p>\n<p>I don\u2019t know much about this one but I am now aware of its existence. A new adventure every day!<\/p>\n<ul>\n<li><a href=\"http:\/\/picocontainer.codehaus.org\/introduction.html\" target=\"_blank\">Introduction to PicoContainer<\/a><\/li>\n<li><a href=\"http:\/\/docs.codehaus.org\/display\/PICO\/Two+minute+tutorial\" target=\"_blank\">Two Minute Tutorial<\/a><\/li>\n<\/ul>\n<h2>Deduplication<\/h2>\n<p>This post was published with the permission of one of our software consultants, Shannon Griswold (<a href=\"www.thegrisexplores.com\" target=\"_blank\">www.thegrisexplores.com<\/a>). Original text can be found <a href=\"http:\/\/www.thegrisexplores.com\/technology\/dependency-injection-options-for-java\/\" target=\"_blank\">here<\/a>.<br \/>\n&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/keyholesoftware.com\/2014\/02\/17\/dependency-injection-options-for-java\/\">Dependency Injection Options for Java<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a>\u00a0Shannon Griswold at the <a href=\"http:\/\/keyholesoftware.com\/\">Keyhole Software<\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to take some time to put together a summary of some popular dependency injection (DI) frameworks for Java. This is a high-level overview of what\u2019s available. First off, what is dependency injection? \u201cDependency injection is a software design pattern that allows the removal of hard-coded dependencies and makes it possible to change them, &hellip;<\/p>\n","protected":false},"author":471,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[124],"class_list":["post-21952","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-dependency-injection"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Dependency Injection Options for Java<\/title>\n<meta name=\"description\" content=\"I wanted to take some time to put together a summary of some popular dependency injection (DI) frameworks for Java. This is a high-level overview of\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dependency Injection Options for Java\" \/>\n<meta property=\"og:description\" content=\"I wanted to take some time to put together a summary of some popular dependency injection (DI) frameworks for Java. This is a high-level overview of\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:author\" content=\"http:\/\/facebook.com\/keyholesoftware\" \/>\n<meta property=\"article:published_time\" content=\"2014-02-25T17:00:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Keyhole Software\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/keyholesoftware\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Keyhole Software\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/dependency-injection-options-for-java.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/dependency-injection-options-for-java.html\"},\"author\":{\"name\":\"Keyhole Software\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/621b02d9eb189f8d1aec83b2bcfa14d6\"},\"headline\":\"Dependency Injection Options for Java\",\"datePublished\":\"2014-02-25T17:00:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/dependency-injection-options-for-java.html\"},\"wordCount\":276,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/dependency-injection-options-for-java.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"Dependency Injection\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/dependency-injection-options-for-java.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/dependency-injection-options-for-java.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/dependency-injection-options-for-java.html\",\"name\":\"Dependency Injection Options for Java\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/dependency-injection-options-for-java.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/dependency-injection-options-for-java.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2014-02-25T17:00:47+00:00\",\"description\":\"I wanted to take some time to put together a summary of some popular dependency injection (DI) frameworks for Java. This is a high-level overview of\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/dependency-injection-options-for-java.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/dependency-injection-options-for-java.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/dependency-injection-options-for-java.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/dependency-injection-options-for-java.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Dependency Injection Options for Java\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/621b02d9eb189f8d1aec83b2bcfa14d6\",\"name\":\"Keyhole Software\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/68be341bef51b95ced09befd6a7e0ca930461d95f3a64285e03e7925b8f5de47?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/68be341bef51b95ced09befd6a7e0ca930461d95f3a64285e03e7925b8f5de47?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/68be341bef51b95ced09befd6a7e0ca930461d95f3a64285e03e7925b8f5de47?s=96&d=mm&r=g\",\"caption\":\"Keyhole Software\"},\"description\":\"Keyhole is a midwest-based consulting firm with a tight-knit technical team. We work primarily with Java, JavaScript and .NET technologies, specializing in application development. We love the challenge that comes in consulting and blog often regarding some of the technical situations and technologies we face.\",\"sameAs\":[\"http:\\\/\\\/keyholesoftware.com\\\/\",\"http:\\\/\\\/facebook.com\\\/keyholesoftware\",\"http:\\\/\\\/linkedin.com\\\/company\\\/keyhole-software\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/keyholesoftware\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/keyhole-software\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dependency Injection Options for Java","description":"I wanted to take some time to put together a summary of some popular dependency injection (DI) frameworks for Java. This is a high-level overview of","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:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html","og_locale":"en_US","og_type":"article","og_title":"Dependency Injection Options for Java","og_description":"I wanted to take some time to put together a summary of some popular dependency injection (DI) frameworks for Java. This is a high-level overview of","og_url":"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"http:\/\/facebook.com\/keyholesoftware","article_published_time":"2014-02-25T17:00:47+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Keyhole Software","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/keyholesoftware","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Keyhole Software","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html"},"author":{"name":"Keyhole Software","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/621b02d9eb189f8d1aec83b2bcfa14d6"},"headline":"Dependency Injection Options for Java","datePublished":"2014-02-25T17:00:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html"},"wordCount":276,"commentCount":6,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["Dependency Injection"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html","url":"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html","name":"Dependency Injection Options for Java","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2014-02-25T17:00:47+00:00","description":"I wanted to take some time to put together a summary of some popular dependency injection (DI) frameworks for Java. This is a high-level overview of","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/dependency-injection-options-for-java.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Dependency Injection Options for Java"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/621b02d9eb189f8d1aec83b2bcfa14d6","name":"Keyhole Software","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/68be341bef51b95ced09befd6a7e0ca930461d95f3a64285e03e7925b8f5de47?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/68be341bef51b95ced09befd6a7e0ca930461d95f3a64285e03e7925b8f5de47?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/68be341bef51b95ced09befd6a7e0ca930461d95f3a64285e03e7925b8f5de47?s=96&d=mm&r=g","caption":"Keyhole Software"},"description":"Keyhole is a midwest-based consulting firm with a tight-knit technical team. We work primarily with Java, JavaScript and .NET technologies, specializing in application development. We love the challenge that comes in consulting and blog often regarding some of the technical situations and technologies we face.","sameAs":["http:\/\/keyholesoftware.com\/","http:\/\/facebook.com\/keyholesoftware","http:\/\/linkedin.com\/company\/keyhole-software","https:\/\/x.com\/http:\/\/twitter.com\/keyholesoftware"],"url":"https:\/\/www.javacodegeeks.com\/author\/keyhole-software"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/21952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/471"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=21952"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/21952\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=21952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=21952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=21952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}