第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

mybatis config.xml 中為什么不需要mapper 來對應(yīng)實體的配置文件捏??

我看過別人用MyBatis, 他們都是再總的 config.xml類似的文件里,配置了 mapper標(biāo)簽,指向幾個實體類對應(yīng)的xml配置文件,就想這樣

這個老師講的mybati配置文件的關(guān)聯(lián)的這個步驟是 交給spring了嗎

正在回答

2 回答

<bean?id="sqlSessionFactory"?class="org.mybatis.spring.SqlSessionFactoryBean">
?????????????....
?????????????....
????<!--?掃描sql?配置文件:?mapper?需要的xml文件?-->
????<property?name="mapperLocations"?value="classpath:mapper/*.xml"/>
</bean>

找到了 ? 是后面的課程里有說明 ?spring 整合mybatis的時候 用了mybatis這個包掃描指定路徑下的配置文件來進(jìn)行對應(yīng)。 ? ?

我著算是自問自答了 ? ?哈哈

1 回復(fù) 有任何疑惑可以回復(fù)我~
??
??<mappers>
????<mapper?resource="com/imooc/config/sqlxml/Message.xml"/>
????<mapper?resource="com/imooc/config/sqlxml/Command.xml"/>
????<mapper?resource="com/imooc/config/sqlxml/CommandContent.xml"/>
??</mappers>


0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

mybatis config.xml 中為什么不需要mapper 來對應(yīng)實體的配置文件捏??

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號