mybatis: Property 'configuration' and 'configLocation' can not specified with together
时间:2021-10-07
本文章向大家介绍mybatis: Property 'configuration' and 'configLocation' can not specified with together,主要包括mybatis: Property 'configuration' and 'configLocation' can not specified with together使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentService': Unsatisfied dependency expressed through field 'studentMapper';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentMapper' defined in file [D:\javaproject\demo\target\classes\com\wang\demo\mapper\StudentMapper.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 [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.IllegalStateException: Property 'configuration' and 'configLocation' can not specified with together
很长的一段错误,我们直接看最后,最后的才是最基础的错误原因,之前的都是由他引发的。
Property 'configuration' and 'configLocation' can not specified with together
configuration和configLocation不能同时存在
看来只能把所有的设置写在mybatis-config.xml里了!
我有一壶酒
足以慰风尘
尽倾江海里
赠饮天下人
原文地址:https://www.cnblogs.com/wangstudyblog/p/15375943.html
- java教程
- Java快速入门
- Java 开发环境配置
- Java基本语法
- Java 对象和类
- Java 基本数据类型
- Java 变量类型
- Java 修饰符
- Java 运算符
- Java 循环结构
- Java 分支结构
- Java Number类
- Java Character类
- Java String类
- Java StringBuffer和StringBuilder类
- Java 数组
- Java 日期时间
- Java 正则表达式
- Java 方法
- Java 流(Stream)、文件(File)和IO
- Java 异常处理
- Java 继承
- Java 重写(Override)与重载(Overload)
- Java 多态
- Java 抽象类
- Java 封装
- Java 接口
- Java 包(package)
- Java 数据结构
- Java 集合框架
- Java 泛型
- Java 序列化
- Java 网络编程
- Java 发送邮件
- Java 多线程编程
- Java Applet基础
- Java 文档注释
- Tiny85哒哒哒哒
- Tiny85哒哒哒
- Julia机器核心编程.多重分配
- 常用注解使用总结系列: @Order 注解
- Fake伪造数据集
- @EnableDiscoveryClient 注解如何实现服务注册与发现
- idea连接docker实现一键部署
- redis的过期策略和内存淘汰机制
- Redis主从复制原理总结
- redis cluster 的核心原理分析:gossip 通信、jedis smart 定位、主备切换
- SpringBoot自动装配原理解析
- 什么是CICD?
- Zabbix 5.0 LTS新功能一览
- 获取电脑真实的IP地址,忽略虚拟机等IP地址的干扰
- K8S系列之K8S集群之Master节点部署