Aug 28th, 2006, 08:19 PM
Setting methods without a set prefix
I'm not sure why I can't seem to find any information regarding my issue as I thought it would be a common problem.
I have a method in a log4j class called addAppender. This does not conform to the Java bean specification as it is not setAppender. Is there any way that I can tell Spring to use the method "addAppender" as when I configure "addAppender" as the property name it is looking for "setAddAppender". I'm sure that I have done this before, but do you think I can find it again!!
Aug 29th, 2006, 12:45 AM
The configuration follows the JavaBeans conventions (and uses the java.beans classes). So there is not direct support for add-methods. However you might try MethodInvokingFactoryBean or experiment with scripting in the config file.
Aug 29th, 2006, 12:54 AM
I think you had a similar thread and I later found that it cant be done directly which is disappointing.
Aug 29th, 2006, 01:22 AM
Don't be too disappointed
As far as I remember, there were ideas for handling these issues, but they have been dropped in favor of the more capable scripting approach. So with scripting things should be done quite easily.