Saturday 15 May 2010

java - What is a standard location for Typesafe Config file in a project directory structure? -



java - What is a standard location for Typesafe Config file in a project directory structure? -

i'm newbie scala , jvm.

i've created project via typesafe activator, , i'm adding configuration using typesafe config.

the documentation typesafe config says can set config file anywhere on classpath under a number of different names.

is there standard location each of these files?

i unfamiliar determining or modifying classpath such project, may separate question.

edit: here directory structure

/home/d/projects/test/minimal-scala1/ ▸ lib/ ▸ project/ ▾ src/ ▾ main/ ▸ scala/ ▸ test/ ▸ target/ activator* activator-launch-1.2.3.jar activator-sbt-echo-akka-shim.sbt activator.bat* build.sbt license

short answer if developing 3rd party lib used other projects

src/main/resources/reference.conf

if developing regular application

src/main/resources/application.conf

long answer system properties not file obviously. can specify them on command line when starting app sbt -dmy.property=value run application.conf src/main/resources/application.conf application.json src/main/resources/application.json note: .conf format more commonly used, can skip file. application.properties src/main/resources/application.properties note: .conf format more commonly used, can skip file. reference.conf src/main/resources/reference.conf note: although meant provided 3rd party libs, nil prevents using file in regular applications.

java scala configuration typesafe-activator

No comments:

Post a Comment