在 Config.groovy 中,我需要 $userHome 变量。它适用于我的开发机器,事实上我使用以下内容:
environments {
development {
grails.plugin.elfinder.rootDir =
"${userHome}/docm_patients_doc/{patientcf}/"
...
}
production {
grails.plugin.elfinder.rootDir =
"${userHome}/docm_patients_doc/{patientcf}/"
...
}
}
或者
environments {
development {
grails.plugin.elfinder.rootDir =
"${System.properties.'user.home'}/docm_patients_doc/{patientcf}/"
...
}
production {
grails.plugin.elfinder.rootDir =
"${System.properties.'user.home'}/docm_patients_doc/{patientcf}/"
...
}
}
在我的生产机器中,似乎 $userHomeusr/share/tomcat7
不是正确的 Home 路径。为什么我会有这种行为?