码迷,mamicode.com
首页 > 数据库 > 详细

Spring的JDBC操作

时间:2019-07-05 22:29:16      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:one   cti   path   eating   pool   XML   size   fine   uid   

 

 

 

1 1 Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userDaoImpl‘: Unsatisfied dependency expressed through field ‘jdbcTemplate‘: Error creating bean with name ‘jdbcTemplate‘ defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean ‘dataSource‘ while setting bean property ‘dataSource‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource‘ defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property ‘macActive‘ of bean class [com.alibaba.druid.pool.DruidDataSource]: Bean property ‘macActive‘ is not writable or has an invalid setter method. Did you mean ‘maxActive‘?; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘jdbcTemplate‘ defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean ‘dataSource‘ while setting bean property ‘dataSource‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource‘ defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property ‘macActive‘ of bean class [com.alibaba.druid.pool.DruidDataSource]: Bean property ‘macActive‘ is not writable or has an invalid setter method. Did you mean ‘maxActive‘?
2 2  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘jdbcTemplate‘ defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean ‘dataSource‘ while setting bean property ‘dataSource‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource‘ defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property ‘macActive‘ of bean class [com.alibaba.druid.pool.DruidDataSource]: Bean property ‘macActive‘ is not writable or has an invalid setter method. Did you mean ‘maxActive‘?  

 

出现以上报错,可能是在配置阿里巴巴的druid数据源(连接池) 的时候 用${ }连接db.properties配置文件用错“ : ”符号。

技术图片

 

Spring的JDBC操作

标签:one   cti   path   eating   pool   XML   size   fine   uid   

原文地址:https://www.cnblogs.com/abcdjava/p/11140984.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!