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

  • 相关阅读:
    AGC003E
    Vegetable's Refrain
    error C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp.
    给linux shell 添加ll命令支持
    编译WDF驱动项目时,缺少WDKConversionPreConfiguration.props文件的问题
    idea报错:Please, configure Web Facet first!以及打开网页后出现:HTTP状态 404
    php安装gd库
    Shell下实现免密码快速登陆MySQL数据库的方法
    mysql命令导入百万数据
    java 两个数字相除后保留小数点
  • 原文地址:https://www.cnblogs.com/abcdjava/p/11140984.html
Copyright © 2011-2022 走看看