mybatis-config.xml找不到
来源:13-5 dao的迁移下

慕圣3009968
2019-07-11
输入正
启动报错说找不到mybatis.config-file
Caused by: java.io.FileNotFoundException: class path resource [mybatis.config-file] cannot be opened because it does not exist
我在application.yml里面配置
mybatis:
config-file: mybatis-config.xml
mapper-locations: /db/mapper/**.xml
type-alias-packages: com.project.scan.db.entity
然后再SessionFactoryConfiguration里面引用
@Value("mybatis.config-file")
private String mybatisConfigFile;
文
写回答
1回答
-
翔仔
2019-07-11
同学好,咱们的配置好像不太一样,建议在没有解决问题的能力之前,先保持和视频一致,后续等所有功能搞定后,再来试着用yaml来解决问题,配置的东西无伤大雅,先让过才好
032019-07-12
相似问题