Auto creating object during getting properties - mybatis
<p>I am using mybatis with spring-boot.  </p>

<pre><code>class A{
    String name;
    NestedClass nestedClass;

    @NoArgsConstructor(access = AccessLevel.PUBLIC)
    public class Nested {
        String nestedName;
    }

}

@Results({
    @Result(property="name", column = "name_col")
    @Result(property="x.nestedName", column = "nestedName_col")
})
</code></pre>

<p>it throws excecption:</p>

<blockquote>
  <p>Error instantiating class models.A$Nested with invalid types () or
  values (). Cause: java.lang.NoSuchMethodException:
  models.A$NestedClass.()</p>
</blockquote>

<p>How to force mybatis to construct object nestedClass with default constructor ?  </p>