在mybatis中,如何查询视图?

将xml文件给加进配置:


<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean" lazy-init="default"
autowire="default">
<property name="dataSource" ref="datasource"/>
<property name="configLocation" value="classpath:config/manageMapperConfig.xml"/>
</bean>


在manageMapperConfig.xml中加入:
<mappers>
<mapper resource="com/logic/model/sqlMap/ZgAreaMapper.xml"/>
</mappers>

posted @ 2016-03-14 22:44  吐槽村  阅读(4906)  评论(0编辑  收藏  举报