Ibatis and mybatis, ibatismybatis
Ibatis inherits SqlMapClientDaoSupport from the daoImpl layer to implement the dao layer interface. This. getSqlMapClientTemplate (). queryForObject ("User. queryById", Id );
The dao interface of mybatis, which is directly queried in the xml file.
Changes from ibatis to mybatis:
- Like the global configuration file, the root element is changed from <sqlMap> to <mapper> due to changes in the DTD constraints.
- <Select> change the parameterClass attribute of the element to the parameterType attribute.
- <Select> change the resultClasss attribute of the element to the resultType attribute.
- The class attribute of <parameterMap> and other elements is changed to the type attribute.
- <Result> the columnIndex attribute of the element is removed.
- The nested parameter is changed from # value # To # {value }.
- In the jdbcType attribute values of <parameter> and other elements, the original "ORACLECURSOR" value is changed to the current "CURSOR", and "NUMBER" value is changed to "NUMERIC ".