---
title: "org.springframework.beans.factory.BeanCreationException: Error creating bean wit"
author: "prodream"
date: "2010-01-24T18:45:48Z"
tags: []
categories: ["企业架构"]
slug: "org-springframework-beans-factory-beancreationexception-error-creating-bean-wit"
draft: false
lastmod: "2010-01-24T18:45:48Z"
id: 578658
url: "https://prodream.iteye.com/blog/578658"
---

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource \[/WEB-INF/applicationContext.xml]:

 

很是郁闷,既然提示我dataSource配置错误.....

 

搞了半天，终于解决..原来是transaction 的问题

 

 &lt;aop:config&gt;  
   &lt;aop:advisor pointcut="execution(public * \*(..))" advice-ref="txAdvice"/&gt;  
 &lt;/aop:config&gt;

 

 

pointcut配置为 全匹配就为出行上面的异常.....

 

我做一下修改就ok了:

 

 &lt;aop:config&gt;  
   &lt;aop:advisor pointcut="execution(public * com.li.service.\*.\*(..))" advice-ref="txAdvice"/&gt;  
 &lt;/aop:config&gt;