Really is not careful enough Ah, was pit one night.
An extremely simple applet, but requires an XML file configuration to inject a value, and the only attribute to be injected is the static member variable in the class:
The Get and set methods are then automatically generated as follows: The pit began ...
Public class food{ privatestatic String desc; Public Static String GetDesc () { return desc; } Public Static void Setdesc (String desc) { = desc; }}
Then the XML is configured as follows:
<id= "Food" class= "xxxk." Food "> <name=" desc " value=" Foods " /></bean>
Then start the error that the set method cannot be found ... Repeatedly compares the name of the set method without any exception. And then one night it was scrapped ...
Finally found that the auto-generated method will be with the static modifier, and spring's set method can not be static, followed by the source to find, although the various values and names can be obtained, but one of the resolveddescriptor is not available.
Remove the static modifier in front of the set method.
Spring injection static member variable hint invalid setter method