Java bean中的spring3init映射
我有以下bean设置:Java bean中的spring3init映射,java,spring,Java,Spring,我有以下bean设置: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans h
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="SMTPPlugin" class="com.org.proj.plugins.SMTPPlugin" />
<bean id="AnotherPlugin" class="com.org.proj.plugins.export.AnotherPlugin" />
<bean id="PluginBaseService" class="com.proj.plugins.PluginBaseService">
<property name="plugins">
<map key-type="java.lang.String" value-type="com.proj.common.plugins.interfaces.IPluginBase">
<entry key="SMTP" value-ref="SMTPPlugin" />
<entry key="ANOTHER" value-ref="AnotherPlugin" />
</map>
</property>
</bean>
</beans>
我真的应该有一些转换器,以使这项工作或我如何才能修复它
谢谢您在SMTPPlugin中缺少了一个公共默认构造函数。显然您没有实现预期要实现的接口。正如我在消息中所述。这两个bean都实现了接口。
java.lang.IllegalStateException: Cannot convert value of type [com.org.proj.plugins.SMTPPlugin] to required type [com.proj.common.plugins.interfaces.IPluginBase] for property 'plugins[SMTP]': no matching editors or conversion strategy found