JBoss AS 7.1 与 Spring 出现警告信息解决方案
在使用Jboss开发spring项目时,在启动是出现警告信息:
11:19:23,280 WARN [org.jboss.as.ee] (MSC service thread 1-5) JBAS011006: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: 无法找到 class org.springframework.web.context.request.async.StandardServletAsyncWebRequest 的默认构造器
网上搜索了解决方案是去除debug信息,但是这样不是根本解决办法,我们根据错误信息,来修改。
下面的解决办法是修改源码,添加默认构造器
根据错误信息,找到spring-web 下面的StandardServletAsyncWebRequest类,当然是.java 文件
修改后,会自动生成.class文件,这样用压缩软件打开jar包,把这个class文件拷贝过去。再重新
启动就不会报 WARN
/**
* 新增的默认构造器
*/
public StandardServletAsyncWebRequest() {}
public StandardServletAsyncWebRequest(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse) {}