title: Can a Mybatis mapper XML configuration be included in another mapper configuration?
body: <p>What I want to do is put various <code>&lt;sql&gt;...&lt;/sql&gt;</code> blocks in a Shared.xml file and then have more specific files include them. </p>
  
  <p>Something like this:</p>
  
  <p><strong>mybatis-config.xml</strong></p>
  
  <pre><code>&lt;configuration&gt;
      &lt;mappers&gt;
          &lt;mapper resource="Shared.xml"/&gt;
          &lt;mapper resource="Custom1.xml"/&gt;
          &lt;mapper resource="Custom2.xml"/&gt;
          &lt;mapper resource="Custom3.xml"/&gt;
      &lt;/mappers&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p><strong>Shared.xml</strong></p>
  
  <pre><code>&lt;mapper namespace="com.company.SharedMapper"&gt;       
      &lt;sql id="someSQL"&gt;
          SELECT 1;
      &lt;/sql&gt;          
  &lt;/mapper&gt;
  </code></pre>
  
  <p><strong>Custom1.xml</strong></p>
  
  <pre><code>&lt;mapper namespace="com.company.CustomMapper1"&gt;      
      &lt;select id="getSomeData" resultMap="CustomResultMap"&gt;
          &lt;include refid="someSQL"/&gt;
      &lt;/select&gt;               
  &lt;/mapper&gt;
  </code></pre>
  
  <p>Obviously this is a very simplified version of what I want but hopefully it's enough to describe what I am going for.</p>
  
  <p>TIA</p>