[英]Controller unable to extend class
I'm getting a nullPointerException with the constructor below... I've also included the parent class. 我在下面的构造函数中得到了一个nullPointerException ...我也包括了父类。
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentController' defined in file [C:\Users\bkuhl\JavaProjects\cmt\cmt\target\cmt\WEB-INF\classes\com\site\cmt\web\ContentController.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.fettergroup.cmt.web.ContentController]: Constructor threw exception; nested exception is java.lang.NullPointerException
And the class (constructor was left out so that it would use the parent constructor) 和类(省略了构造函数,以便使用父构造函数)
public class ContentController extends com.site.cmt.library.Controller {
...
}
and the parent class 和父类
public class Controller {
private SortedMap<Integer, String> cssFiles;
private SortedMap<Integer, String> jsFiles;
public Controller () {
this.addCss("global.css");
this.addJs("global.js");
}
....
您是否尝试过省略addCss
和addJs
以确保问题不在实现方法之内?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.