Web app root system property already set to different value 错误

xiaoxiao2021-02-27  211

使用c3p0时出现:

Web app root system property already set to different value

需要加上

<context-param>     <param-name>webAppRootKey</param-name>     <param-value>web</param-value>   </context-param>

从代码看出,该方法其实就是把该web application的根目录的绝对文件路径作为属性保存在 System的属性列表中。

该属性的名字,由web.xml文件中的名为"webAppRootKey"的参数值指出。

如果不在web.xml中定义 webAppRootKey参数,那么属性名就是缺省的"webapp.root".在我们的petclinic项目中已经定义了 webAppRootKey参数,其值为"petclinic.root",因此,属性的名字就是"petclinic.root".

最后将webAppRootKey项配置好,错误解决。
转载请注明原文地址: https://www.6miu.com/read-8865.html

最新回复(0)