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.springframework.test.contex[email protected]]to prepare test instance [[email protected]]

java.lang.IllegalStateException: Failed to load ApplicationContext

这个错误找了半天,还以为是逻辑错误,没想是applicationContext.xml中的jdbcUrl要与上面的数据池dataSource.class中定义的相应的数据链接名称一一对应。下面是自己配好的正确答案,根据自己参数的配。

Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]:


相关文章:

  • 2021-09-23
  • 2021-05-22
  • 2021-06-15
  • 2021-06-30
  • 2021-05-30
  • 2021-10-25
  • 2021-09-22
  • 2022-12-23
猜你喜欢
  • 2022-01-20
  • 2021-12-24
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
  • 2022-03-10
  • 2022-12-23
相关资源
相似解决方案