我需要为我的 Play 应用程序配置一些 URL,所以我将它们添加到application.conf
:
application.url="http://www.mydomain.com"
application.url.images="http://www.anotherdomain.com"
application.url.images.logo="${application.url.images}/logo.png"
...
下面是我在视图中用于访问上述条目的代码:
@(title: String)
@import play.api.Play.current
<!DOCTYPE html>
<html>
...
<img src="@{ currrent.configuration.getString("application.url.images.logo") }" />
...
</html>
嗯......我快疯了,因为每当我运行应用程序时,我总是收到以下错误消息:
/home/j3d/Projects/test-app/conf/application.conf: 14-19: application.url.images.logo has type OBJECT rather than STRING
任何的想法?我错过了什么吗?或者它是一个错误?
非常感谢你。