替换wicket 6.3 jquery [英] replace wicket 6.3 jquery
问题描述
迁移到wicket 6.3后,在使用jquery的页面上,chrome中的developertools控制台出现错误. wicket 6.3使用内置的jquery似乎包含一些到rvzr-a.akamaihd.net的链接.
After migration to wicket 6.3, I encountered an error in console of developertools in chrome on pages that use jquery. it seems that the jquery that wicket 6.3 use built-in, contains some link to rvzr-a.akamaihd.net.
Failed to load resource: the server responded with a status of 403 (Forbidden) http://rvzr-a.akamaihd.net/amz/aeyJhZmZpZCI6MTAxOCwic3ViYWZmaWQiOjEwMjIsImh…2h0Ijo3NjgsImxvYWRlcl9jbGllbnRfdGltZXN0YW1wIjoxMzc2MzY2MTU0MTAxfQ%3D%3D.js
推荐答案
You can provide Wicket with your own version of JQuery as described on http://wicket.apache.org/. In you application class, override the init method like so:
@Override
protected void init() {
getJavaScriptLibrarySettings().setJQueryReference(new UrlResourceReference(Url.parse("http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js")));
}
(您可以从 http://cdnjs.com/中选择其他版本的JQuery)
(you can pick other versions of JQuery from http://cdnjs.com/)
话虽这么说,我对Wicket持怀疑态度,但他会提到rvzr-a.akamaihd.net.
That being said I'm skeptical Wicket would have references to rvzr-a.akamaihd.net.
这篇关于替换wicket 6.3 jquery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!