In the elevator project, I installed the db configurations in a file called db.properties
/src/main/resources/db.properties
And in my Boot.scala , I read it as:
val input = this.getClass.getResourceAsStream("db.properties") println("### input: " +input) val db = new java.util.Properties db.load(input) val url = db.getProperty("url") println("#### url:" + url)
Then I start sbt:
sbt prepare-web jetty-start
The console prints some errors:
#
Strange climb can't find db.properties !
I checked target/webapp/WEB-INF/classes , and db.properties is there! Where is it wrong?
source share