Hi all, I am working on a web application which is divided into two modules.
api contains repository/DAO classes and service classes. I am using mybatis as ORM. I am having an app-context for api in which I am creating org.mybatis.spring.SqlSessionFactoryBean. This bean is passed a datasource. My DAO extends SqlSessionDaoSupport. When I am running tests on my DAO classes the tests are running fine.
However when I add the api jar to my ui and try to get the instance of a service class in any controller I am getting an error saying Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required.
I understood that the beans in api are not getting initialized.
It means the app-context.xml in api is not being read by spring container.
How can I in initialize beans in app-context.xml of api module? or should I create all those beans in ui app-context.xml again?