spring+mybatis集成问题

m540920181 m540920181 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="#{jdbc.driverClassName}"></property>
<property name="url" value="#{jdbc.url}"></property>
<property name="username" value="#{jdbc.username}"></property>
<property name="password" value="#{jdbc.password}"></property>
</bean>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="configLocation" value="classpath:com/xiaoxiao/xml/MapConfig.xml" />
<property name="dataSource" ref="dataSource"></property>
</bean>


<bean id="mapperFactoryBean" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.xiaoxiao.services.StudentServeice" />
<property name="sqlSessionFactory" ref="sqlSessionFactory" />
</bean>
这个是我的配置文件,报的异常总是
2012-06-05 10:35:42,474 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.reflect.MalformedParameterizedTypeException
...全文

相关推荐

评论 4
收藏 已收藏
分享
返回顶部
m540920181
Java EE 67,535 成员 225,843 内容