问题描述
- 难道这类问题的出现就我一个人?
-
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path resource [spring-mybatis.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-mybatis.xml]: Cannot resolve reference to bean 'druidDataSource' while setting bean property 'druidDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'druidDataSource' defined in class path resource [spring-mybatis.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'int' for property 'initialSize'; nested exception is java.lang.NumberFormatException: For input string: "${druid.initialSize}"当我删除除(ClassName,url,pass,name)以外的配置时,报初始化错误- dataSource init error。该怎么解决?
关于连接池的配置基本是没有问题的。
之前用DBCP的连接池,总是显示找不到${driver}。。 求求大神 帮看看是为什么。
解决方案
报错要和代码一起看,不然神仙也看不出来什么问题
时间: 2024-07-28 17:02:18