Spring MVC配置IOC 空指针的问题,围观啊,求解啊~!
我用的是SpringMVC+Spring JDBC 配置Ioc的时候,发现空指针,没有DI,报了空指针。
SpringMVC基于注解配置。然后在applicationContext中配置IOC的Bean。发现配置了没有注入进去,求解!
<bean id="newsDao" class="com.zkl.dao.impl.NewsDao_Impl">
<property name="jdbcTemplate" ref="jdbcTemplate"></property>
</bean>
<bean id="newsBiz" class="com.zkl.biz.impl.NewsBiz_Impl">
<property name="newsDao" ref="newsDao"></property>
</bean>
<bean id="newsController" class="com.zkl.controller.NewsController">
<property name="newsBiz" ref="newsBiz"></property>
</bean>