您的位置:首页 > 编程语言 > Java开发

全自动,企业级,springmvc,

2016-06-12 17:15 429 查看
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.framework.mapper.AfdcityMapper">
<sql id="selectId">
id,
parent_id,
name,
level,
seq
</sql>

<span style="white-space:pre">	</span><!-- 这里关注 <pre name="code" class="html">com.framework.entity.AfdcityFormMap,
findCityPage ,
<pre name="code" class="html">tc_afdcity


--><select id="findCityPage" resultType="com.framework.entity.AfdcityFormMap">select<include refid="selectId" />from tc_afdcitywhere 1=1</select></mapper>


真的全自动,很多类都没写,直接通过数据库的映射来获取类,所以,相关的方法也是,还有映射回去的实体类

还有关于mapper

afdcity-mapper.xml

afdcity-mapper.xml

afdcity必须为tc_afdcity数据库的后序字节,

以上全部是因为公司的框架是这么写的原因。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: