<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=donnchadh" rel="nofollow">Donnchadh O Donnabhain</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3359?redirect=false" rel="nofollow">SPR-3359</a></strong> and commented</p>
<p dir="auto">Here is a simple test case:</p>
<p dir="auto">Object testObject = new Object() {<br>
public Object getNestedObject() {<br>
return new Object() {<br>
Integer value = 0;</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="        public void setIntValue(Integer value) {
            this.value = value;
        }
        
        public Integer getIntValue() {
            return value;
        }
    };
}"><pre class="notranslate"><code class="notranslate">        public void setIntValue(Integer value) {
            this.value = value;
        }
        
        public Integer getIntValue() {
            return value;
        }
    };
}
</code></pre></div>
<p dir="auto">};<br>
new org.springframework.beans.BeanWrapperImpl(testObject).setPropertyValue("nestedObject.intValue", "1");</p>
<p dir="auto">Note that it works for primitive types as it resorts to using java.beans.PropertyEditorManager.findEditor</p>
<p dir="auto">Looking at the spring sources:<br>
In PropertyEditorRegistrySupport, should there not be a line to copy<br>
defaultEditorsActive?<br>
/**</p>
<ul dir="auto">
<li>Copy the default editors registered in this instance to the given<br>
target registry.</li>
<li><code class="notranslate">@param</code> target the target registry to copy to<br>
*/<br>
protected void copyDefaultEditorsTo(PropertyEditorRegistrySupport target) {<br>
target.defaultEditors = this.defaultEditors;<br>
}</li>
</ul>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.4</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="398077276" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8074" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8074/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8074">#8074</a> Bean nested properties generates exception at initialization time (<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="398077761" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8132" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8132/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8132">#8132</a> AbstractFormController: binding of boolean inside a list does not work anymore in spring 2.0.4. in opposite to 2.0.3 (<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="398077559" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8107" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8107/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8107">#8107</a> Nested BeanWrapperImpl may not have the default editors active. (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=simonwg" rel="nofollow">Simon Wong</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9464?redirect=false" rel="nofollow">SPR-9464</a></strong> and commented</p>
<p dir="auto">The issue could be revealed if MyBatis for Spring is used.</p>
<p dir="auto">MapperScannerConfigurer in MyBatis for Spring v1.1.0+ has changed to use BeanDefinitionRegistryPostProcessor instead of BeanFactoryPostProcessor as of v1.0.x for scanning MyBatis mapper resources.</p>
<p dir="auto">The case is postProcessBeanDefinitionRegistry(BeanDefinitionRegistry beanDefinitionRegistry) is not called by Spring container if MapperScannerConfigurer is created through <code class="notranslate">@Bean</code> (but it will be called if the bean is created through XML configuration)</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1.1</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/19798/TestSpring31MyBatis.zip" rel="nofollow">TestSpring31MyBatis.zip</a> (<em>10.58 kB</em>)</li>
</ul>
<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="398109541" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12525" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12525/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12525">#12525</a> BeanDefinitionRegistryPostProcessor registered via <code class="notranslate">@Bean</code> will not be invoked (<em><strong>"duplicates"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398111929" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12917" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12917/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12917">#12917</a> BeanFactoryPostProcessor breaks default post-processing of <code class="notranslate">@Configuration</code> classes</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-attic/spring-framework-issues/commit/a1584d7aa1906ab06ffe0dc8161c187647c8f6cc/hovercard" href="https://github.com/spring-attic/spring-framework-issues/commit/a1584d7aa1906ab06ffe0dc8161c187647c8f6cc">spring-attic/spring-framework-issues@<tt>a1584d7</tt></a></p>