Hi barry,
I just checked the recent 2.0.2 with the following class
Code:
package com.springsource;
import org.springframework.beans.factory.annotation.Autowired;
public class AutowiredConstructorTest {
@Autowired
public AutowiredConstructorTest(String test) {
}
}
and corresponding Spring config:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- either use the context config element -->
<!-- <context:annotation-config />-->
<!-- or register post processor manually -->
<bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor" />
<bean class="com.springsource.AutowiredConstructorTest" />
</beans>
I don't get the "No constructor with 0 arguments..." error in that scenario which is as expected. If I remove the context:annotation-config or the AutowiredAnnotationBeanPostProcessor the error pops up. IMHO that is as expected...
If that does not work for you, please go ahead and open a JIRA and attach a simple zipped Eclipse test project.
Thanks,
Christian