“application.path”的目的和用法多变的
在剧中! Server.java
中 main
方法的框架源代码我找到了这两行:
File root = new File(System.getProperty("application.path"));
if (System.getProperty("precompiled", "false").equals("true")) {
Play.usePrecompiled = true;
}
Where can I find the application.path
value?
In the Play! framework source for the main
method in Server.java
I found these two lines:
File root = new File(System.getProperty("application.path"));
if (System.getProperty("precompiled", "false").equals("true")) {
Play.usePrecompiled = true;
}
Where can I find the application.path
value?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
System.getProperty("application.path")
看起来像-D
属性。所以在服务器启动时有一个类似的调用第 251 行中的
java -Dapplication.path=/opt/play/myApp
/play/framework/pym/play/application.py
完成了工作。System.getProperty("application.path")
that looks like a-D
property. So at the start of the server there is a call likejava -Dapplication.path=/opt/play/myApp
/play/framework/pym/play/application.py
in line 251 makes the work.您的应用程序中可能有一个属性文件,并且可能有一种机制将所有这些属性加载到系统属性中。
在应用程序文件夹文件内容中搜索 application.path ,您可能会得到线索。
There might be a properties file in your application and also there might be a mechanism to load all those properties into System properties.
Search for application.path in your application folder file contents and you may get a clue.
它可能位于您的
application.conf
文件中。检查那里。It may be in your
application.conf
file. Check there.