zoukankan      html  css  js  c++  java
  • Spring的JDBC操作

    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配置文件用错“ : ”符号。

  • 相关阅读:
    BZOJ 2190: [SDOI2008]仪仗队
    BZOJ 3195: [Jxoi2012]奇怪的道路
    【BZOJ-1068】压缩 区间DP
    【BZOJ-1103】大都市meg 树状数组 + DFS序
    【BZOJ-4326】运输计划 树链剖分 + 树上差分 + 二分
    【BZOJ-3721】Final Bazarek 贪心
    【BZOJ-4690】Never Wait For Weights 带权并查集
    【BZOJ-2503】相框 并查集 + 分类讨论
    【BZOJ-3653】谈笑风生 DFS序 + 可持久化线段树
    【BZOJ-3252】攻略 DFS序 + 线段树 + 贪心
  • 原文地址:https://www.cnblogs.com/abcdjava/p/11140984.html
Copyright © 2011-2022 走看看