开发者社区> 问答> 正文

我的代码包那么多错误,让人恐慌,请问有解决办法么Exception encountered duri

已解决

  1. 警告: Exception encountered during contextinitialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name'dataSource' defined in class path resource [applicationContext.xml]: Errorsetting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'jdbcUrl' of beanclass [com.alibaba.druid.pool.DruidDataSource]: Bean property 'jdbcUrl' is notwritable or has an invalid setter method. Does the parameter type of the settermatch the return type of the getter?

  2. 严重: Caught exception while allowingTestExecutionListener[org.springframewor[email protected]2adb1d4]to prepare test instance [[email protected]]

java.lang.IllegalStateException : Failed to load ApplicationContext

展开
收起
我是小美女 2021-10-23 14:37:13 400 0
1 条回答
写回答
取消 提交回答
  • 网络规划设计师、敏捷专家、CISP、ITSS服务经理、ACA全科目、ACP4项、ACE、CBP、CDSP、CZTP等。拥有 PRINCE2 Foundation/Practitioner、CCSK、ITIL、ISO27001、PMP等多项国际认证。 专利5+、期刊10+、知识产权师。核心期刊审稿人。
    采纳回答

    您好,初步判断applicationContext.xml中的jdbcUrl要与上面的数据池dataSource.class中定义的相应的数据链接名称没有一一对应。请检查。

    2021-10-23 14:39:32
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载