问题:
我在web.xml中配置了
<listener >
<listener-class > cn.deduct.deductVal</listener-class >
</listener>
然后在deductVal 的contextInitialized 方法中,想用项目中实现类,是三层架构的,可以执行到logic层,为什么到DB层,就报空指针异常了啦!!
分析:猜测是使用的对象没有实例化,可能是没有将某些类配置到容器中管理,无法给你初始化。
问题:
我在web.xml中配置了
<listener >
<listener-class > cn.deduct.deductVal</listener-class >
</listener>
然后在deductVal 的contextInitialized 方法中,想用项目中实现类,是三层架构的,可以执行到logic层,为什么到DB层,就报空指针异常了啦!!
分析:猜测是使用的对象没有实例化,可能是没有将某些类配置到容器中管理,无法给你初始化。