title: How to use 'EnumOrdinalTypeHandler' with mybatis's typeHandler in Spring's xml?
body: <p>I am using mybatis with spring.
  I want to store Enum type with int value(which called 'ordinal') in mysql.There is a simple way in mybatis:</p>
  
  <pre><code>&lt;!-- mybatis-config.xml --&gt;
  &lt;typeHandlers&gt;
  &lt;typeHandler handler="org.apache.ibatis.type.EnumOrdinalTypeHandler"     javaType="com.stackoverflow.MyEnumType"/&gt;
  &lt;/typeHandlers&gt;
  </code></pre>
  
  <p>So when excute select or insert sql,the auto-mapper will automatically use EnumOrdinalTypeHandler.</p>
  
  <p>My question is:</p>
  
  <p>1:How to use this in Spring's context.xml like this or any other way:</p>
  
  <pre><code>&lt;bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"&gt;
      &lt;property name="typeHandlers"&gt;
       ...
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>2:How can I configure for all enum types with less code such as <code>'component-scan'</code> or <code>'MapperScannerConfigurer'</code>,no need to list every enum type?</p>