<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Configuration Simplifications in Spring 3.0</title>
	<atom:link href="http://blog.springsource.org/2009/12/22/configuration-simplifications-in-spring-3-0/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.springsource.org/2009/12/22/configuration-simplifications-in-spring-3-0/</link>
	<description>The voice of SpringSource</description>
	<lastBuildDate>Wed, 08 Feb 2012 17:31:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: AlanB</title>
		<link>http://blog.springsource.org/2009/12/22/configuration-simplifications-in-spring-3-0/comment-page-1/#comment-201895</link>
		<dc:creator>AlanB</dc:creator>
		<pubDate>Thu, 08 Sep 2011 10:47:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3875#comment-201895</guid>
		<description>I am finding what looks like a bug with spring using @Configuration although it could be my lack of knowledge.

I am using the org.springframework.batch.test.JobLauncherTestUtils class (Spring batch test framework). I have 2 spring batch jobs defined in my xml context file. 

If I define the job launcher in xml ie


	  
 

then it works as expected using the job bean defined eventsBatchJob. Without defining the job property I would get an error saying that 2 beans of that type exist as it tries to autowire by type.

However if I try to use @Configuration instead of xml to define the &quot;eventsJobLauncherTestUtils&quot; bean I run into trouble.

   @Bean(name = &quot;eventsJobLauncherTestUtils&quot;)
    public JobLauncherTestUtils eventsJobLauncherTestUtils() {
        JobLauncherTestUtils jobLauncherTestUtils = new JobLauncherTestUtils();
        //eventsBatchJob is injected
        jobLauncherTestUtils.setJob(eventsBatchJob);
        return jobLauncherTestUtils;
    }

Despite having set the job property in code above and there is no error in that method it glitches with the error that it cannot autowire as 2 beans jobs of that type exist. This should not be the case as I have set the job property explicitly. It is my understanding the above code should work in the same way as the xml snippet I posted above. (using spring version 3.0.5 and tried 3.0.6 and the 3.1.2Milestone but to no avail).

The JobLauncherTestUtils class has an autowire annotation set for the setJob accessor but the class itself is not defined as spring bean via annotations.</description>
		<content:encoded><![CDATA[<p>I am finding what looks like a bug with spring using @Configuration although it could be my lack of knowledge.</p>
<p>I am using the org.springframework.batch.test.JobLauncherTestUtils class (Spring batch test framework). I have 2 spring batch jobs defined in my xml context file. </p>
<p>If I define the job launcher in xml ie</p>
<p>then it works as expected using the job bean defined eventsBatchJob. Without defining the job property I would get an error saying that 2 beans of that type exist as it tries to autowire by type.</p>
<p>However if I try to use @Configuration instead of xml to define the &#034;eventsJobLauncherTestUtils&#034; bean I run into trouble.</p>
<p>   @Bean(name = &#034;eventsJobLauncherTestUtils&#034;)<br />
    public JobLauncherTestUtils eventsJobLauncherTestUtils() {<br />
        JobLauncherTestUtils jobLauncherTestUtils = new JobLauncherTestUtils();<br />
        //eventsBatchJob is injected<br />
        jobLauncherTestUtils.setJob(eventsBatchJob);<br />
        return jobLauncherTestUtils;<br />
    }</p>
<p>Despite having set the job property in code above and there is no error in that method it glitches with the error that it cannot autowire as 2 beans jobs of that type exist. This should not be the case as I have set the job property explicitly. It is my understanding the above code should work in the same way as the xml snippet I posted above. (using spring version 3.0.5 and tried 3.0.6 and the 3.1.2Milestone but to no avail).</p>
<p>The JobLauncherTestUtils class has an autowire annotation set for the setJob accessor but the class itself is not defined as spring bean via annotations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kaka2008</title>
		<link>http://blog.springsource.org/2009/12/22/configuration-simplifications-in-spring-3-0/comment-page-1/#comment-191946</link>
		<dc:creator>kaka2008</dc:creator>
		<pubDate>Wed, 06 Apr 2011 06:15:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3875#comment-191946</guid>
		<description>hi,what&#039;s @Configuration mean?

i find it works well without @Configuration</description>
		<content:encoded><![CDATA[<p>hi,what&#039;s @Configuration mean?</p>
<p>i find it works well without @Configuration</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zach t</title>
		<link>http://blog.springsource.org/2009/12/22/configuration-simplifications-in-spring-3-0/comment-page-1/#comment-178121</link>
		<dc:creator>zach t</dc:creator>
		<pubDate>Thu, 04 Nov 2010 19:48:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3875#comment-178121</guid>
		<description>check this out for the SVN client errors you guys are facing: http://nayidisha.com/techblog/accessing-remote-svn-repositories-from-eclipse</description>
		<content:encoded><![CDATA[<p>check this out for the SVN client errors you guys are facing: <a href="http://nayidisha.com/techblog/accessing-remote-svn-repositories-from-eclipse" rel="nofollow">http://nayidisha.com/techblog/accessing-remote-svn-repositories-from-eclipse</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blog.springsource.org/2009/12/22/configuration-simplifications-in-spring-3-0/comment-page-1/#comment-176726</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 24 Sep 2010 19:28:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3875#comment-176726</guid>
		<description>I am also able to connect to via browser however 2-3 svn client I have tried all of them giving same error 
as Eliot 
 Could not resolve hostname `src.springframework.org&#039;: The reques
ted name is valid and was found in the database, but it does not have the correc
t associated data being resolved for.

Help would be appriciated.</description>
		<content:encoded><![CDATA[<p>I am also able to connect to via browser however 2-3 svn client I have tried all of them giving same error<br />
as Eliot<br />
 Could not resolve hostname `src.springframework.org&#039;: The reques<br />
ted name is valid and was found in the database, but it does not have the correc<br />
t associated data being resolved for.</p>
<p>Help would be appriciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Beams</title>
		<link>http://blog.springsource.org/2009/12/22/configuration-simplifications-in-spring-3-0/comment-page-1/#comment-173368</link>
		<dc:creator>Chris Beams</dc:creator>
		<pubDate>Tue, 08 Jun 2010 22:43:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3875#comment-173368</guid>
		<description>It&#039;s possible there&#039;s something with your bank&#039;s network restricting this, but not terribly likely.  If your browser can connect via https (port 443) to the given URL, it follows that any client should be able to do the same.  when you say `svn co https://...` it&#039;s doing fundamentally the same thing as your browser.  Perhaps try the same thing from home tonight, or somewhere outside your bank&#039;s network just to make sure it works there.  Sorry you&#039;re having trouble.  Just so we&#039;re clear, here&#039;s exactly what I just did to prove that it works for me:
&lt;code&gt;
cbeams@anakata:~&gt;$ svn co https://src.springframework.org/svn/spring-samples/configuration-basic/trunk configuration-basic
A    configuration-basic/.classpath
A    configuration-basic/.project
A    configuration-basic/src
A    configuration-basic/src/test
A    configuration-basic/src/test/java
A    configuration-basic/src/test/java/org
A    configuration-basic/src/test/java/org/springframework
A    configuration-basic/src/test/java/org/springframework/samples
A    configuration-basic/src/test/java/org/springframework/samples/config
A    configuration-basic/src/test/java/org/springframework/samples/config/basic
A    configuration-basic/src/test/java/org/springframework/samples/config/basic/account
A    configuration-basic/src/test/java/org/springframework/samples/config/basic/account/TransferServiceTest.java
A    configuration-basic/src/test/resources
A    configuration-basic/src/test/resources/log4j.dtd
A    configuration-basic/src/test/resources/log4j.xml
A    configuration-basic/src/main
A    configuration-basic/src/main/java
A    configuration-basic/src/main/java/org
A    configuration-basic/src/main/java/org/springframework
A    configuration-basic/src/main/java/org/springframework/samples
A    configuration-basic/src/main/java/org/springframework/samples/config
A    configuration-basic/src/main/java/org/springframework/samples/config/basic
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/repository
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/repository/AccountRepository.java
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/repository/InMemoryAccountRepository.java
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/service
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/service/TransferService.java
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/service/TransferServiceImpl.java
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/AppConfig.java
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/domain
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/domain/Account.java
A    configuration-basic/pom.xml
Checked out revision 479.
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>It&#039;s possible there&#039;s something with your bank&#039;s network restricting this, but not terribly likely.  If your browser can connect via https (port 443) to the given URL, it follows that any client should be able to do the same.  when you say `svn co <a href="https://..." rel="nofollow">https://&#8230;</a>` it&#039;s doing fundamentally the same thing as your browser.  Perhaps try the same thing from home tonight, or somewhere outside your bank&#039;s network just to make sure it works there.  Sorry you&#039;re having trouble.  Just so we&#039;re clear, here&#039;s exactly what I just did to prove that it works for me:<br />
<code><br />
cbeams@anakata:~>$ svn co <a href="https://src.springframework.org/svn/spring-samples/configuration-basic/trunk" rel="nofollow">https://src.springframework.org/svn/spring-samples/configuration-basic/trunk</a> configuration-basic<br />
A    configuration-basic/.classpath<br />
A    configuration-basic/.project<br />
A    configuration-basic/src<br />
A    configuration-basic/src/test<br />
A    configuration-basic/src/test/java<br />
A    configuration-basic/src/test/java/org<br />
A    configuration-basic/src/test/java/org/springframework<br />
A    configuration-basic/src/test/java/org/springframework/samples<br />
A    configuration-basic/src/test/java/org/springframework/samples/config<br />
A    configuration-basic/src/test/java/org/springframework/samples/config/basic<br />
A    configuration-basic/src/test/java/org/springframework/samples/config/basic/account<br />
A    configuration-basic/src/test/java/org/springframework/samples/config/basic/account/TransferServiceTest.java<br />
A    configuration-basic/src/test/resources<br />
A    configuration-basic/src/test/resources/log4j.dtd<br />
A    configuration-basic/src/test/resources/log4j.xml<br />
A    configuration-basic/src/main<br />
A    configuration-basic/src/main/java<br />
A    configuration-basic/src/main/java/org<br />
A    configuration-basic/src/main/java/org/springframework<br />
A    configuration-basic/src/main/java/org/springframework/samples<br />
A    configuration-basic/src/main/java/org/springframework/samples/config<br />
A    configuration-basic/src/main/java/org/springframework/samples/config/basic<br />
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account<br />
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/repository<br />
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/repository/AccountRepository.java<br />
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/repository/InMemoryAccountRepository.java<br />
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/service<br />
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/service/TransferService.java<br />
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/service/TransferServiceImpl.java<br />
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/AppConfig.java<br />
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/domain<br />
A    configuration-basic/src/main/java/org/springframework/samples/config/basic/account/domain/Account.java<br />
A    configuration-basic/pom.xml<br />
Checked out revision 479.<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eliot</title>
		<link>http://blog.springsource.org/2009/12/22/configuration-simplifications-in-spring-3-0/comment-page-1/#comment-173366</link>
		<dc:creator>Eliot</dc:creator>
		<pubDate>Tue, 08 Jun 2010 22:35:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3875#comment-173366</guid>
		<description>@Chris, I can reach URL via web browser fine.  Perhaps the problem is that I work at a bank? They have very non standard network security here.</description>
		<content:encoded><![CDATA[<p>@Chris, I can reach URL via web browser fine.  Perhaps the problem is that I work at a bank? They have very non standard network security here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Beams</title>
		<link>http://blog.springsource.org/2009/12/22/configuration-simplifications-in-spring-3-0/comment-page-1/#comment-173365</link>
		<dc:creator>Chris Beams</dc:creator>
		<pubDate>Tue, 08 Jun 2010 22:31:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3875#comment-173365</guid>
		<description>@Eliot - Can you reach https://src.springframework.org/svn/spring-samples/configuration-basic/trunk/ with your browser?</description>
		<content:encoded><![CDATA[<p>@Eliot &#8211; Can you reach <a href="https://src.springframework.org/svn/spring-samples/configuration-basic/trunk/" rel="nofollow">https://src.springframework.org/svn/spring-samples/configuration-basic/trunk/</a> with your browser?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eliot</title>
		<link>http://blog.springsource.org/2009/12/22/configuration-simplifications-in-spring-3-0/comment-page-1/#comment-173355</link>
		<dc:creator>Eliot</dc:creator>
		<pubDate>Tue, 08 Jun 2010 20:43:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3875#comment-173355</guid>
		<description>Is there a way to download this project without SVN?

Because the SVN repository seems to have a problem now.  Here is the error message I am getting... 

&gt;svn co https://src.sprin
gframework.org/svn/spring-samples/configuration-basic/trunk configuration-basic
svn: OPTIONS of &#039;https://src.springframework.org/svn/spring-samples/configuratio
n-basic/trunk&#039;: Could not resolve hostname `src.springframework.org&#039;: The reques
ted name is valid and was found in the database, but it does not have the correc
t associated data being resolved for.
 (https://src.springframework.org)</description>
		<content:encoded><![CDATA[<p>Is there a way to download this project without SVN?</p>
<p>Because the SVN repository seems to have a problem now.  Here is the error message I am getting&#8230; </p>
<p>&gt;svn co <a href="https://src.sprin" rel="nofollow">https://src.sprin</a><br />
gframework.org/svn/spring-samples/configuration-basic/trunk configuration-basic<br />
svn: OPTIONS of &#039;<a href="https://src.springframework.org/svn/spring-samples/configuratio" rel="nofollow">https://src.springframework.org/svn/spring-samples/configuratio</a><br />
n-basic/trunk&#039;: Could not resolve hostname `src.springframework.org&#039;: The reques<br />
ted name is valid and was found in the database, but it does not have the correc<br />
t associated data being resolved for.<br />
 (<a href="https://src.springframework.org" rel="nofollow">https://src.springframework.org</a>)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Beams</title>
		<link>http://blog.springsource.org/2009/12/22/configuration-simplifications-in-spring-3-0/comment-page-1/#comment-173265</link>
		<dc:creator>Chris Beams</dc:creator>
		<pubDate>Mon, 07 Jun 2010 12:03:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3875#comment-173265</guid>
		<description>you have a few choices:
    getBeansOfType(AccountRepository.class) - fetch all implementations
    getBean(&quot;accountRepositoryMemory&quot;, AccountRepository.class) - qualify by bean name

or, mark one of the @Bean methods with @Primary, and then simply call
    getBean(AccountRepository.class) - the &#039;primary&#039; bean will be the one returned</description>
		<content:encoded><![CDATA[<p>you have a few choices:<br />
    getBeansOfType(AccountRepository.class) &#8211; fetch all implementations<br />
    getBean(&#034;accountRepositoryMemory&#034;, AccountRepository.class) &#8211; qualify by bean name</p>
<p>or, mark one of the @Bean methods with @Primary, and then simply call<br />
    getBean(AccountRepository.class) &#8211; the &#039;primary&#039; bean will be the one returned</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: smallufo</title>
		<link>http://blog.springsource.org/2009/12/22/configuration-simplifications-in-spring-3-0/comment-page-1/#comment-173263</link>
		<dc:creator>smallufo</dc:creator>
		<pubDate>Mon, 07 Jun 2010 11:26:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3875#comment-173263</guid>
		<description>sorry , typo , 
I meant accountRepositoryMemory() and accountRepositoryDisk() , two difference methods.</description>
		<content:encoded><![CDATA[<p>sorry , typo ,<br />
I meant accountRepositoryMemory() and accountRepositoryDisk() , two difference methods.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

