我不知道 grails 在启动时会加载一组默认插件。这在使用 run-app 以开发模式运行时并不明显。但是当我构建一个战争并将其放入应用服务器时,内存使用量变得非常高,我看到以下日志片段:
31767 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [i18n] with version [2.1.0] loaded successfully
31770 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [logging] with version [2.1.0] loaded successfully
31771 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [core] with version [2.1.0] loaded successfully
32039 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [groovyPages] with version [2.1.0] loaded successfully
32053 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [urlMappings] with version [2.1.0] loaded successfully
32060 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [controllers] with version [2.1.0] loaded successfully
32076 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [domainClass] with version [2.1.0] loaded successfully
32079 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [dataSource] with version [2.1.0] loaded successfully
32547 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [cacheHeaders] with version [1.1.5] loaded successfully
32548 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [redis] with version [1.3.2] loaded successfully
32549 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [resources] with version [1.1.6] loaded successfully
32549 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [services] with version [2.1.0] loaded successfully
32551 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [servlets] with version [2.1.0] loaded successfully
32561 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [mimeTypes] with version [2.1.0] loaded successfully
32571 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [codecs] with version [2.1.0] loaded successfully
32579 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [filters] with version [2.1.0] loaded successfully
32579 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [validation] with version [2.1.0] loaded successfully
32583 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [scaffolding] with version [2.1.0] loaded successfully
32598 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [converters] with version [2.1.0] loaded successfully
32664 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [lesscssResources] with version [1.3.0] loaded successfully
32676 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [cachedResources] with version [1.0] loaded successfully
32684 [main] INFO org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Grails plug-in [zippedResources] with version [1.0] loaded successfully
我如何禁用某些插件的加载,因为我不需要它们?比如说,脚手架插件和 domainClass 插件(这是一个没有 DB 连接的 HTML 5 应用程序)
谢谢 !