囜旎
qq_慕神9507294
Could not open ServletContext resource [/mybatis-config.xml] 看下配置信息是否配置有问题
qq_慕神9507294
慕后端5281458
同学好,可以在https://gitee.com/xiangze/areadisplay https://gitee.com/xiangze/demo 下载
慕勒2424959
z不许人间见白头z
我也遇到了相似的错误。。请问怎么解决?谢谢
慕后端5959719
原因是 你的程序没有找到你的mapper.xml,大概率是你配置的路径有问题。检查下下你的 application.propertities的
mapper_path=/mapper/**.xml
慕少653974
qq_薛野_0
qq_慕哥8571497
__XiaoN
肯定点不来啊,因为url和user是在dataSource包下面的啊,Spring.datasource.url这是SpringBoot的配置版本的,而通过创建dataSorce实例对象来设置数据库的数据源这是SpringBoot的配置形式,和SSM的xml形式很像,
qq_Struggle_47
DataSource 引入的是javax.sql.dataSource这个包
weixin_慕虎4471085
类是不是导错了?
慕斯3842920
还是报错啊
慕斯0437856
我也遇到过这个问题,然后我在pom.xml中,把mysql那一段里面<scope>runtime</scope>这一句删了就好了
qq_不被作好先生的坏叔叔_0
清理以下缓存 修改下载地址
qq_慕先生3056250
第一个字母改为小写s sqlSessionFactoryBean.setConfigLocation(new ClassPathResource(mybatisConfigFilePath));
qq_慕瓜5338692
去.m2仓库中把c3p0删掉

再回到eclipse右键项目->maven->update project
试试看行不行,反正我当时也是提示 ComboPooledDataSource 找不到,按照上面的操作后,就能引用com.mchange.v2.c3p0.ComboPooledDataSource 这个了
aniuAL
我也遇到这个问题 求大神解决!!! Error creating bean with name 'areaDao' defined in file [D:\SpringBoot\demo\target\classes\com\imooc\demo\dao\AreaDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/imooc/demo/config/dao/SessionFactoryConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: The setting useColumLabel is not known. Make sure you spelled it correctly (case sensitive).
慕哥2296688
同学好,课程里面解释了哈,其一,主要是为了接轨实战课里我带领大家从SSM框架无缝迁移至Springboot。其二,spring分为几种配置,基于xml,基于注解以及基于bean config,而bean config虽然编码比较多,但是是最灵活的一种方式,建议注解+bean config这种形式来管理自己的spring应用
凯lhck2018
Alt+回车
慕移动8022910
看得懂,但是觉得太麻烦了,mybatis需要那么多配置,感觉和我学的不对路
慕雪8062931
weixin_慕运维0058249
设置下警告级别就好了
慕村4437626
springboot约定大于配置,所有要尽量少写配置文件,如这些不得已而为之的配置,要使用java类的方式生成配置
慕容4547114
确认不是包引错了吗?
qq_慕村3329871
好了吗?
超小咪
老师说都可以啊,功能一样的,只是mybatis那一个比较流行用xml,其他的配置都可以直接写配置类然后加上@configuration就可以了。看个人喜好和掌握程度吧
MrWYY
哈哈哈,
@Qualifier(value = "dataSource")
罗小黑003
有的:
前端 https://gitee.com/xiangze/areadisplay
后台 https://gitee.com/xiangze/demo