Play Framework application layout with custom Java package name
It's not really obvious how you could use custom Java package namespace in play framework 2.4.x. The official doc simply has a one liner:
the controllers, models and views package name conventions are now just that
But now:
- do you put the
app
folder undercom.org
? - What about the
conf
folder? also thepublic
folder? - What about sub-projects?
- Say you got it to work with
activator
you probably still can't get IntelliJ stop complaining about 'package name do not corresspond to path'?
So, I came up with a sample Play 2.4.x Java project that has the bare bone components to show how it could be done.
It showcases:
- the correct project folder structure
- config referencing modules from a custom package
- views referencing layouts and partials from a custom package
- views referencing models from a custom package
- views referencing helper from a sub-project library
- routes referencing controllers from a custom package
- build.sbt building solutions and internal library with custom packages
Ronald Widha: Play Framework application layout with custom Java package name: It's not really o... https://t.co/RWXQZCbtZ8 #meawin8champ