在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>