<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>IoC on Random Ramblings</title><link>https://blog.foundev.pro/tags/IoC.html</link><description>Recent content in IoC on Random Ramblings</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 19 Sep 2010 19:01:00 +0000</lastBuildDate><atom:link href="https://blog.foundev.pro/tags/IoC/index.xml" rel="self" type="application/rss+xml"/><item><title>Java IoC containers and classpath scanning (or what I’ve been looking for from .NET for months)</title><link>https://blog.foundev.pro/2010/09/19/java-ioc-containers-and-classpath-scanning-or-what-i-ve-been-looking-for-from-net-for-months.html</link><pubDate>Sun, 19 Sep 2010 19:01:00 +0000</pubDate><guid>https://blog.foundev.pro/2010/09/19/java-ioc-containers-and-classpath-scanning-or-what-i-ve-been-looking-for-from-net-for-months.html</guid><description>&lt;h1&gt;Java IoC containers and classpath scanning (or what I’ve been looking for from .NET for months)&lt;/h1&gt;&#10;Frustrated with the typical way I saw IoC used in Java where every example I found involved thousands of lines of XML &#10;and/or Java code to configure Java beans or components.&amp;#160; This is very different than IoC typically used in .NET where most IoC containers allow &#10;you to "autowire" in their terminology up every class in an assembly with a couple of lines of code.&amp;#160; Having been coding in that fashion &#10;for several years in .NET I was dismayed when none of my fellow Java coders that I worked with or knew personally had any concept &#10;of the equivalent functionality, and instead informed me the IDE would be my help in maintaining these massive XML files. &#10;&lt;p&gt;Not content with their answers I burrowed into Spring, Guice and PicoContainer docs and found &amp;ldquo;classpath scanning&amp;rdquo; which is roughly&lt;br&gt;&#10;equivalent to &amp;ldquo;autowire&amp;rdquo; in .NET. Below is an example of this in Spring 3:&lt;/p&gt;</description></item></channel></rss>