将 grails 应用程序转换为插件 [英] Convert grails app to plugin

查看:27
本文介绍了将 grails 应用程序转换为插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过 grails create-app 启动了一个 grails 应用程序.对于模块化,我觉得组件最好是插件.我可以将此应用程序转换为 grails 插件吗?谢谢,巴布.

I started a grails application by grails create-app. For modularity, I feel like it would be better that component be a plugin. Can I convert this application into a grails plugin? thanks, Babu.

推荐答案

我从未基于之前编写的应用程序创建插件,而是查看了 grails 插件文档 您可以阅读以下声明:

I never created a plugin based on an application written before but looking at the documentation for grails plugins you can read the following statement:

Grails 插件的结构与常规 Grails 项目的目录结构完全相同,除了在插件目录的根目录中您会找到一个名为插件描述符"的插件 Groovy 文件.

The structure of a Grails plugin is exactly the same as a regular Grails project's directory structure, except that in the root of the plugin directory you will find a plugin Groovy file called the "plugin descriptor".

所以我建议使用 grails create-plugin *your-plugin-name* 创建一个新插件,并将应用程序中的所有文件复制到插件中.

So I would suggest to create a new plugin with grails create-plugin *your-plugin-name* and copy all files from your application into the plugin.

这篇关于将 grails 应用程序转换为插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆