A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
Mybatis + spring don't work.
Joined: Jan 14, 2002
Jul 27, 2011 21:10:07
this is the spring config for mybatis:
<bean id="userDao" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="sqlSessionFactory" ref="sqlSessionFactory" />
<property name="mapperInterface" value="org.jpadbf.spring3mybatis3.dao.UserDao" />
and this is my
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
but it print "null", why? i can initial other beans in the spring config file, so i think there is not problem with the spring.
i use spring3.1.0 M2, mybatis3.0.5 and mybatis-spring1.0.1
thanks for any helps.
author & internet detective
Joined: May 26, 2003
Jul 28, 2011 19:14:36
Was there anything in the logs when starting up the app? Maybe it can't find something the DAO relies on?
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
Don't get me started about those stupid
subject: Mybatis + spring don't work.
Spring DAO + Hibernate; is this right?
Session closed exception
get ref bean from applicationContext.xml
Error coming in using JDO with Spring framework.
data not persisted using hibernate spring integration
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014