<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=jaybytez" rel="nofollow">Jay Blanton</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9526?redirect=false" rel="nofollow">SPR-9526</a></strong> and commented</p>
<p dir="auto">We have a web service architecture where any service (API - Int/Impl) could be exposed as a web service.  Because of this we have very granular deployment artifacts where each service builds down to a JAR.  That way we can pick and chose what JARs create a web service implementation (into a WAR).  Because of this we have duplicated property file imports and context file imports, but we know it is going to happen because each individual service needs to be buildable, runnable, and testable...and then it might be composed into a larger service.</p>
<p dir="auto">The example from this thread:<br>
<a href="http://forum.springsource.org/showthread.php?36482-Preventing-Spring-Context-to-be-loaded-more-than-once&amp;highlight=duplicate+context+files" rel="nofollow">http://forum.springsource.org/showthread.php?36482-Preventing-Spring-Context-to-be-loaded-more-than-once&amp;highlight=duplicate+context+files</a></p>
<p dir="auto">Is a perfect example:<br>
<a href="http://piotrga.wordpress.com/2007/03/21/preventing-spring-context-to-be-loaded-more-than-once/" rel="nofollow">http://piotrga.wordpress.com/2007/03/21/preventing-spring-context-to-be-loaded-more-than-once/</a></p>
<p dir="auto">We might Service B (which is it's own WAR), Service C (which is it's own WAR), and also a Service A (which has dependencies on Service B/C) and therefore pulls in duplicate import statements for the same context file.</p>
<p dir="auto">The following is a post that I made, without a response, describing the same issue with the property-placeholder.<br>
<a href="http://stackoverflow.com/questions/8949174/does-spring-ignore-duplicate-property-placeholder-files" rel="nofollow">http://stackoverflow.com/questions/8949174/does-spring-ignore-duplicate-property-placeholder-files</a></p>
<p dir="auto">Since we are aware of the duplicates, we don't want to have exceptions thrown when encountering duplicate bean ids.  We don't receive these errors/issues, but we can see that the duplicate files are loaded and override each other.</p>
<p dir="auto">It would be beneficial if both the import and property-placeholder had the capability to ignore-duplicate-files, or via a property in a custom ApplicationContext (like we extend XmlWebApplicationContext) which would allow the ignore-duplicate-files for properties or bean context files.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.5</p>
<p dir="auto"><strong>Reference URL:</strong> <a href="http://forum.springsource.org/showthread.php?36482-Preventing-Spring-Context-to-be-loaded-more-than-once&amp;highlight=duplicate+context+files" rel="nofollow">http://forum.springsource.org/showthread.php?36482-Preventing-Spring-Context-to-be-loaded-more-than-once&amp;highlight=duplicate+context+files</a></p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398168055" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/16379" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/16379/hovercard" href="https://github.com/spring-projects/spring-framework/issues/16379">#16379</a> Multiple bean instances are created when no id is specified (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398058623" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/5845" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/5845/hovercard" href="https://github.com/spring-projects/spring-framework/issues/5845">#5845</a> Load files in  only once</li>
</ul>
<p dir="auto">10 votes, 7 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=kdonald" rel="nofollow">Keith Donald</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6731?redirect=false" rel="nofollow">SPR-6731</a></strong> and commented</p>
<p dir="auto">Noticed when using <code class="notranslate">@RequestBody</code> to bind an incoming JSON string to an Account JavaBean.  I was expecting the binding process to respect format annotations such as <code class="notranslate">@NumberFormat</code> and <code class="notranslate">@DateTimeFormat</code> during string-to-propertyType conversion.  However, this did not happen since it appears the MappingJacksonHttpMessageConverter is using the default Jackson ObjectMapper by default.  For consistency, we should consider configuring Jackson to work with the ConversionService during its mapping process.  This would allow format annotations like <code class="notranslate">@NumberFormat</code> and <code class="notranslate">@DateTimeFormat</code> to be respected.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 GA</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398104228" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11715" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11715/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11715">#11715</a> Allow usage of ConversionService for Jackson HttpMessageConverter (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398171298" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/16758" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/16758/hovercard" href="https://github.com/spring-projects/spring-framework/issues/16758">#16758</a>  Support jackson mix-in classes in Jackson2ObjectMapperFactoryBean</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398172849" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/16918" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/16918/hovercard" href="https://github.com/spring-projects/spring-framework/issues/16918">#16918</a> Add serializerByType() deserializerByType() and mixIn() to Jackson2ObjectMapperBuilder</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398102148" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11395" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11395/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11395">#11395</a> resolveRequestBody algorithm does not take into account ConversionService when determining if binding is possible</li>
</ul>
<p dir="auto">13 votes, 20 watchers</p>