Play Framework: split routes in multiple files without sub projects

后端 未结 2 551
北海茫月
北海茫月 2020-12-08 20:13

My play project is massive and the routes file is approx 1Mb. Now, when scala compiles, I have the exception \"Method code too large\" because of the routing and the reverse

2条回答
  •  鱼传尺愫
    2020-12-08 20:46

    If your file name is technical.routes, while including the file, mention technical.Routes (caps).

    The parameter after -> is the url prefix, so to access any url of technical.routes file, you need to add the prefix.

    http://127.0.01/technical/{defined url in technical.routes file}

提交回复
热议问题