版权声明:博客知识产权来源命运的信徒,切勿侵权 https://blog.csdn.net/qq_37591637/article/details/84893819
com.opensymphony.xwork2.config.ConfigurationException: Unable to load configuration.
Caused by: com.opensymphony.xwork2.config.ConfigurationException: Action class [cn.com.action.Product] does not have a public no-arg constructor
Caused by: java.lang.NoSuchMethodException: cn.com.action.Product.<init>()
我是struts2的初学者,刚学就出现这个错误!
原因:
类里面缺少无参的构造函数!
如果一个类里面没有任何构造函数,默认是无参的;
如果一个类里面有一个有参数的构造函数,默认的无参构造函数就会被覆盖掉