插件中是否有相当于 Bootstrap 类的类
有没有办法在插件中初始化一些数据。我正在模块化我的代码,如果插件中有类似引导程序的东西就好了,但我找不到它。我也无法使用谷歌找到参考资料。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,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.