spring+ibatis,注入对象为空的有关问题,望各位大神前来指教

spring+ibatis,注入对象为空的问题,在线等,望各位大神前来指教
applicationcontext.xml
<bean id="dataSource"
class="com.tydic.springframework.datasource.DriverManagerDataSource"
init-method="init" />

<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>classpath:/config/sql-map-config.xml</value>
</property>
<property name="dataSource">
<ref bean="dataSource" />
</property>
</bean>
<bean id="sqlMapClientTemplate" class="org.springframework.orm.ibatis.SqlMapClientTemplate">
<property name="sqlMapClient">
<ref bean="sqlMapClient" />
</property>
</bean>

<bean id="dataBaseOper" class="com.tydic.db.DataBaseOper">
<property name="sqlMapClientTemplate">
<ref bean="sqlMapClientTemplate" />
</property>
</bean>

被注入类中的代码

 public void insertSTK(final List<Map<String, Object>> list){
  if(dataBaseOper==null){
  System.out.println("为空");
  }else{
  System.out.println("不为空");
  }
   for (Map<String, Object> map : list) {
   dataBaseOper.insertSTKinfo(map);
}
报的错
为空
Exception in thread "main" java.lang.NullPointerException
at com.tydic.business.StkInfoInsert.insertSTK(StkInfoInsert.java:154)
at com.tydic.business.StkInfoInsert.main(StkInfoInsert.java:54)

main中调用了这个方法,放入list参数,进行插入数据库操作
------解决方案--------------------
不能用main方法调用这个函数,main方法不需要启动服务的,因为你这个类是用注入的方法实现的,而注入是需要启动服务的,