插件中是否有与 Bootstrap 类等效的类 [英] Is there an equivalent to the Bootstrap class in a Plugin
本文介绍了插件中是否有与 Bootstrap 类等效的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法在插件中初始化一些数据.我正在模块化我的代码,如果插件中有类似引导程序的东西会很好,但我找不到它.我也无法使用 Google 找到参考资料.
Is there an a way to initialise some data in a Plugin. I am modulizing my code and it would be nice to have something like the bootstrap in the Plugin but I cannot find it. Nor can I find references using the Google.
推荐答案
BootStrap.groovy 默认从插件 zip 中排除,但您可以创建一个 MyPluginBootStrap.groovy(名称无所谓,只是不能是 BootStrap) 并将其与应用程序的 BootStrap 一起打包和运行.
BootStrap.groovy is excluded by default from a plugin zip, but you can create a MyPluginBootStrap.groovy (name doesn't matter, just can't be BootStrap) and that'll be packaged and run along with the application's BootStrap.
这篇关于插件中是否有与 Bootstrap 类等效的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文