4
讀取網址我需要配置一些網址,我的Play應用程序,所以我說他們application.conf
:遊戲框架:無法從application.conf
application.url="http://www.mydomain.com"
application.url.images="http://www.anotherdomain.com"
application.url.images.logo="${application.url.images}/logo.png"
...
這裏下面我以我的觀點使用接入代碼上面的條目:
/home/j3d/Projects/test-app/conf/application.conf: 14-19: application.url.images.logo has type OBJECT rather than STRING
:
@(title: String)
@import play.api.Play.current
<!DOCTYPE html>
<html>
...
<img src="@{ currrent.configuration.getString("application.url.images.logo") }" />
...
</html>
嗯...我,因爲每當我運行應用程序,我總是收到以下錯誤消息越來越瘋狂
有什麼想法?我錯過了什麼嗎?或者它是一個錯誤?
非常感謝。
謝謝...它的工作原理:-)請讓我指出$ {application.url.images}必須位於雙引號之外(即$ {application.url.images}「/ logo.png」)。 – j3d 2013-02-12 19:05:11