日期:2014-05-17  浏览次数:20621 次

那位高手帮我看下这个问题Cannot convert value of type [] to required type [] for property 'ba
本帖最后由 hongfu951 于 2012-04-17 00:33:06 编辑
applicationContext.xml 配置
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

<!-- 开启注解处理器 -->
  
<!-- 定义使用C3P0连接池的数据源 -->
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
      <property name="driverClass">
        <value>com.mysql.jdbc.Driver</value>
      </property>
      <property name="jdbcUrl">
        <value>jdbc:mysql://localhost:3306/mysys?useUnicode=true&amp;characterEncoding=gbk</value>
      </property>
      <property name="user">
        <value>root</value>
      </property>  
      <property name="password">
        <value>root</value>
      </property>
      <!-- 设置数据库连接池的最大连接数 -->
  <property name="maxPoolSize">
<value>20</value>
  </property>
  <!-- 设置数据库连接池的最小连接数 -->
  <property name="minPoolSize">
     <value>2</value>
  </property>
  <!-- 设置数据库连接池的初始化连接数 -->
  <property name="initialPoolSize">
<value>2</value>
  </property>
  <!-- 设置数据库连接池的连接的最大空闲时间,单位为秒 -->
  <property name="maxIdleTime">
<value>20</value>
  </property>
    </bean>
    <!-- 读取ibatis配置文件org.springframework.orm.ibatis.SqlMapClientFactoryBean -->
    <bean id="sqlMapClient"  class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource">
<ref local="dataSource" />
</property>
<property name="configLocation" value="classpath:configibatis/SqlMapConfig.xml"></property>
    </bean>

<!-- 把加载了 配置文件的 sqlMapClient 注入 SqlSessionTemplate模板-->  
   <bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate">  
      <constructor-arg index="0" ref="sqlMapClient" /> 
   </bean>  
    
   <!-- 通过spring 把已经加载ibatis配置文件sqlMapClient bean 注入到 dao类 供 dao类查询数据 -->  
   <bean id="basedao" class="com.sysbase.dao.baseDaoImpl">  
   <!-- 使用构造器注入&