報錯:Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required

幾個月前這個spring boot 2.0.0 + mybatis項目還能正常運行,但是今天發現報錯Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required

通過博文發現是缺少如下數據庫連接池的包,我這裏用的druid,這裏要添加druid for spring boot依賴,如下:

<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.9</version>
</dependency>

添加上後項目可以正常啓動了

但我不知道爲什麼幾個月前沒有這個標籤也不報錯呢?

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章