Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Grails2.4中安装jQuery1.11.3?_Jquery_Grails - Fatal编程技术网

如何在Grails2.4中安装jQuery1.11.3?

如何在Grails2.4中安装jQuery1.11.3?,jquery,grails,Jquery,Grails,我在BuildConfig.groovy的插件部分中有这一行: runtime ":jquery:1.11.1" 存储库中可用的最新版本是: 但是我需要1.11.3版本,如果我尝试用 grails install-plugin 我收到一条警告,指示我应该使用BuildConfig.groovy中的plugins部分来安装插件,该插件仅限于1.11.1版本 如何安装它 在文件jquery-1.11.1.min.js中复制和粘贴jquery-1.11.3.min.js的代码会不会太愚蠢?根据g

我在BuildConfig.groovy的插件部分中有这一行:

runtime ":jquery:1.11.1"
存储库中可用的最新版本是:

但是我需要1.11.3版本,如果我尝试用

grails install-plugin
我收到一条警告,指示我应该使用BuildConfig.groovy中的plugins部分来安装插件,该插件仅限于1.11.1版本

如何安装它


在文件jquery-1.11.1.min.js中复制和粘贴jquery-1.11.3.min.js的代码会不会太愚蠢?

根据grails jquery插件文档,您可以在config.groovy中指定jquery版本,如下所示

jquery {
    sources = 'jquery' // Holds the value where to store jQuery-js files /web-app/js/
    version = '1.4.1' // The jQuery version in use
}

这对您不起作用吗?

在我的例子中,我不再使用jQuery Grails插件。我更喜欢这种方法:

ApplicationResources.groovy

modules = {
    jQuery1113 {
        resource "lib/jquery/jquery-1.11.3.min.js"
    }

    app {
        dependsOn "bootstrap3", "angularJs", "jQuery1113"
    }
}
然后在普惠制中:

<r:require module="jQuery1113"/>


<r:require module="app"/>