Well, the first method is working. I started from scratch and it worked. I did a clean command before the compile command. It seems that old compiled files were the cause of my problem.
Be careful to note that you cannot have an overlap in package names in the routes files. E.g. in this example, the technical.routes
file contains all routes in the controllers.technical
and the main routes file cannot contain any routes in the controllers.technical
package.
conf/routes
contents:
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
-> /technical technical.Routes
GET / controllers.Dashboard.index()
conf/technical.routes
contents:
# Routes
# ~~~~
GET / controllers.technical.App.index()
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…