所以,我有这个bean:
<bean id="toMailController" class="com.appointments.kohler.controller.ToEmailController">
<property name="templateTransformer" ref="templateTransformer"></property>
</bean>
在我的ToEmailController.java我有这个(只是重要的行):
public ToEmailController extends AbstractController {
public TemplateTransformer _templateTransformer;
@Required
public void setTemplateTransformer(TemplateTransformer templateTransformer)
{
this._templateTransformer = templateTransformer;
}
public TemplateTransformer getTemplateTransformer()
{
return this._templateTransformer;
}
}
如果我从本地主机执行这个项目,它运行得很好,但是当我把他放在 weblogic 中时,我收到以下错误:
org.springframework.beans.NotWritablePropertyException: Invalid property 'templateTransformer' of bean class [com.appointments.kohler.controller.ToEmailController]: Bean property 'templateTransformer' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
但我无法得到它。我究竟做错了什么?有任何想法吗?