How to ignore missing Spring properties and not call setter method
Anyone knows a way to make PropertyPlaceholderConfigurer ignore missing properties and not call the setter method at all?
for example:
<bean id="webAppContext" class="org.eclipse.jetty.webapp.WebAppContext" scope="prototype">
<property name="maxFormContentSize" value="${maxFormContentSize}"/>
</bean>I can use a default value for the placeholder, but in some cases I want to let jetty use whatever it defaults to, so I will not supply the maxFormContentSize property and I would expect the container to not call the setter method. but it does call the setter method with the placeholder's literal value and ignoreUnresolvablePlaceholders does not help here.

Comments
cant you go with another solutions? like:
1.create a class which extend PropertyPlaceholderConfigurer and override processProperties function.
manage your defaults in that class and your setters will always be called with the right value (default or not).
2.another way arround is when you initial the PropertyPlaceholderConfigurer, give it to 2 properties files, the first one will be the default file with all default values, so if it doesnt exist in the second, defaults will be taken from the first.
hope it helps
I could extend PropertyPlaceholderConfigurer but I wanted to avoid it.
there is a more standard way to set default values to placeholders like ${myprop:mydefaultvalue} but I didn't wand a default value of my own, I want the class to use its hard coded defaults so when I upgrade a jetty version the class will still use its defaults and not my defaults.
actually the best solution available out of the box is with PropertyOverrideConfigurer that will only override what you specify in its properties file, but it has some drawbacks.
there are some discussion in the spring forums about this issue and one of the spring developers has opened a jira issue for this and maybe they will implement it someday.
https://jira.springsource.org/browse/SPR-7415
http://forum.springsource.org/showthread.php?t=93082
http://forum.springsource.org/showthread.php?t=92661