val config = Configuration(ConfigFactory.load()) val hoge = config.getString("hoge.fuga").getOrElse("fuga") val config = Configuration(ConfigFactory.load(ConfigFactory.parseFileAnySyntax(new File("conf/hoge.conf")))) val hoge = config.getString("hoge.fuga").getOrElse("fuga") #リクエストパラメータで受け取る場合 GET /messages controllers.Application.messages(id: String, name:String) #パスで受け取る場合 GET /messages/:id/:nam
![設定ファイルとURLからパラメータを読み込む - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/e9dd01ced147454d1a6cfdc6f1d80cc4951272d1/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-9f5428127621718a910c8b63951390ad.png%3Fixlib%3Drb-4.0.0%26w%3D1200%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTkxNiZoPTMzNiZ0eHQ9JUU4JUE4JUFEJUU1JUFFJTlBJUUzJTgzJTk1JUUzJTgyJUExJUUzJTgyJUE0JUUzJTgzJUFCJUUzJTgxJUE4VVJMJUUzJTgxJThCJUUzJTgyJTg5JUUzJTgzJTkxJUUzJTgzJUE5JUUzJTgzJUExJUUzJTgzJUJDJUUzJTgyJUJGJUUzJTgyJTkyJUU4JUFBJUFEJUUzJTgxJUJGJUU4JUJFJUJDJUUzJTgyJTgwJnR4dC1jb2xvcj0lMjMyMTIxMjEmdHh0LWZvbnQ9SGlyYWdpbm8lMjBTYW5zJTIwVzYmdHh0LXNpemU9NTYmdHh0LWNsaXA9ZWxsaXBzaXMmdHh0LWFsaWduPWxlZnQlMkN0b3Amcz02NzI0NjAzNjkxMTMyNWExYmYzOWYxMzc2OTMzZWU3Mw%26mark-x%3D142%26mark-y%3D112%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTYxNiZ0eHQ9JTQwY2F3YXJhJTQwZ2l0aHViJnR4dC1jb2xvcj0lMjMyMTIxMjEmdHh0LWZvbnQ9SGlyYWdpbm8lMjBTYW5zJTIwVzYmdHh0LXNpemU9MzYmdHh0LWFsaWduPWxlZnQlMkN0b3Amcz0wZmY5MTMxMGMzMWZjNDJiMDRjMTg4NzBjNzQ4NzYzYQ%26blend-x%3D142%26blend-y%3D491%26blend-mode%3Dnormal%26s%3D3cefe832a75dd48f5fe127d5d932b273)