Best way to create an Admin section in Grails

后端 未结 3 1410
庸人自扰
庸人自扰 2021-01-02 09:14

Hy,

I\'m wondering what\'s the best way to create an Admin (backend) section in a Grails app ?

I want to create an \"Admin\" folder in the \"controllers\" f

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-02 09:22

    My preference for this is to have a separate application for admin. Stick all of your domain classes in a plugin and install that plugin into both the admin application and the consumer appilcation.

    That way, you can tweak the controllers to your hearts content and not worry about end users hitting them. Shared services can also be in the domain plugin.

    There's a special file that you can put in your grails-app/conf called BuildConfig.groovy where you can specify "local" plugins like the domain plugin that are automatically brought into the classpath without having to package/install the plugin. Makes it super easy.

提交回复
热议问题