我知道如何将Bean注入Java Web脚本中,这很简单:
```
我知道如何将Bean注入Java Web脚本中。这非常简单:
```<bean id="webscript.ru.mycompany.maypackage.myclass.get"
class="ru.mycompany.maypackage.myclass"
parent="webscript">
<property name="properties">
<ref bean="global-properties"/>
</property>
</bean>
但是对于自定义Java类,它并不起作用,变量属性为空 :(
<bean id="myclass"
class="ru.mycompany.maypackage.myclass">
<property name="properties">
<ref bean="global-properties"/>
</property>
</bean>
public class myclass
{
private Properties properties;
public myclass()
{
}
public void setProperties(Properties properties)
{
this.properties = properties;
}
}
What should I do?