catalina.home不被intellij认可
我正在使用一个属性占位符来引用一个文件,它在部署时可以正常工作,但是intellij没有拿起catalina home。我已经尝试在intellij ide设置中设置windows环境varibale和路径,没有区别仍然显示错误(在ide中将我的数据源borks)我可以将conf文件放在项目目录中,但是然后项目将无法移植到其他tomcat安装没有进一步的jiggery pokery ....
I am using a property place holder to reference a file, it works when deployed, but intellij is not picking up the catalina home. I have tried setting windows environment varibale and path in intellij ide settings, makes no difference still shows an error (which borks my datasource in the ide) I could place the conf file in project directory instead, but then the project will not be portable to other tomcat installs without further jiggery pokery ....
当然,有一种方法可以在我的春季应用程序环境中正确识别和引用$ {catalina.home}吗?
Surely there is a way that intellij will recognize and reference correctly ${catalina.home} within my spring application context ?
Sys变量设置好了:
Sys variable is set up ok :
显然这是一个开放的错误。然而,我的解决方法是简单地将属性文件复制到项目工作区(在我的情况下是资源目录),但保持applicationContext.xml指向 $ {catalina.home}
。
Apparently this is an open bug. However the workaround for me is to simply copy the properties file into project workspace (in my case the resources direcrtory), but keep the applicationContext.xml pointing at ${catalina.home}
.
然后Intellij获取属性值,然后可以轻松设置数据源。
Intellij then picks up the property values and then the datasource can be set up easily.