JakubM
JakubM

Reputation: 994

How to configure path to routes file in PlayFramework?

I'm using PlayFramework 2.6. I wanted to use the default sbt directory structure so I've created my routes file under the /src/main/resources/ directory. How do I configure that path? Should I use application.conf for that?

Upvotes: 1

Views: 694

Answers (1)

Luca T.
Luca T.

Reputation: 1651

To use the default sbt directory layout, you have to disable the PlayLayoutPlugin in project configuration into build.sbt.

Like the following:

lazy val play = (project in file("."))
  .enablePlugins(PlayScala)
  .disablePlugins(PlayLayoutPlugin)
  .settings(
    ...
    // other settings
  )

Reference: Play documentation

Upvotes: 3

Related Questions