springboot添加dao層啓動失敗

今天進行項目啓動的時候出現了以下的錯誤:mysql

具體信息以下:spring

application.propertiessql

spring.profiles.active=dubbo,datasource,quartz,email

application-datasource.propertiesapp

#col數據源配置
col.datasource.driver-class-name=com.mysql.jdbc.Driver
col.datasource.jdbc-url=jdbc:mysql://127.0.3.24:3311/col?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
col.datasource.username=col
col.datasource.password=col
col.datasource.minimum-idle=10
col.datasource.maximum-pool-size=30
collection.datasource.pool-name=col-db-pool
col.datasource.max-lifetime=1800000
col.datasource.idle-timeout = 600000
col.datasource.connection-timeout=30000
col.datasource.auto-commit=true
col.datasource.validation-timeout=5000
col.datasource.leak-detection-threshold=0

 

後通過不斷的嘗試發現,將config裏面的MaperScan中的.*去掉就行了(其餘的有.*的文件夾下面還有子文件夾):url

經上面能夠總結:3d

如果basePackages的目錄中有子文件夾,則能夠加.*,如果沒有子文件夾則須要去掉.*code

相關文章
相關標籤/搜索