Static Resources Plugin
When you are serving images and
other binary files you usually want to do this via a high performance
native httpd such as Apache. This means you need (ideally) to store
them in a location outside of the webapplication, but you also need to
be able to access them locally while you are developing your grails
application.
This plugin makes it easy. Using it means:
- You no longer have to upload all your, perhaps very large, static
content when you update your web application - i.e. smaller WAR sizes
- Your static resources can be served faster by a highly optimized native httpd such as Apache
- Your static resources still appear as part of your local Grails project filestructure
- Your static resources can be updated on the live server without redeploying your WAR or editing the expanded WAR directory
- Behaviour of your application is identical on server or locally,
with no special effort from you (apart from setting up your live
server's httpd to serve /resources/ alias)
Install the plugin into your project. Then simply make any links
to resources that are to be served "externally" use the
<g:resourceLinkTo dir="xxx" file="yyyy"/> tag.
Put your static resources into <yourproject>/static/
Run
the application and your resources will be served by another mini httpd
on port 8088, separate from the Grails Jetty. It serves everything
under ./static.
To deploy to a live server, upload all your content from ./static (Which is not bundled in your WAR) to your httpd's filesystem.
When
running on a live server, the plugin automatically prepends /resources/
to all resource links. You may therefore need to add a SetEnvIf line to
exclude /resources/ from your mod_jk mappings, if you have your
web-application mounted to /
If you don't have your webapplication mounted to /
you can either copy your ./static content to your httpd's document tree
under /resources/ or to somewhere else and have an alias for /resources
point to it.
You may also add a configuration option to change
the location of the production files. The configuration key is:
staticresources.production.resource.prefix
Marc Palmer
marc AT anyware.co.uk
Get the ZIP file or source from:
http://svn.grails-plugins.codehaus.org/browse/grails-plugins/grails-staticresources
分享到:
相关推荐
静态资源管理 插件 环境变量和模式 学习目标 目录 目录 知识架构 7.1 Vue CLI脚手架工具 知识架构 7.2 插件 知识架构 7.3 CLI服务和配置文件 知识架构 7.4 环境变量和模式 知识架构 7.5 静态资源管理 7.5 静态资源...
gulp插件——解决模板和静态资源编译后相对路径定位的问题,目前可支持对html、css和js的解析
扩展插件(Save All Resources),用这个插件可以下载整个网页的静态资源源代码包,包括图片、js、 html、css; 插件安装方法:将zip压缩包整个拖入谷歌浏览器扩展程序界面(chrome://extensions/),这样浏览器就能...
simply-static是一个简单的一键生成全站静态html文件的wordpress插件,支持生成或不生成指定url的html文件,生成文件的资源路径可选相对路径、绝对路径和脱机文件,html文件可以直接生成在服务器或zip压缩包下载。...
WordPress静态化插件,感觉寻找这样插件的人不在少数,人们都说WordPress非常消耗资源,所以,希望有这样的文件。与 WP-Cache 相同,可以通过缓存来提高大负载下WordPress的性能。WP Super Cache 相比 WP-Cache 最大...
使用gulp 插件完成静态资源发布,发布资源包括 css js img等资源发布.自动对比静态资源生成版号,添加到资源链接上
Zblog首页静态生成插件非常利于首页的静态化,是zblog必备的一款插件资源,例如www.meiguiyou.com博客上就有比较好的seo,通过使用首页静态化能够实现搜索引擎的快速收录,对于seo非常有利,现在提供下载。
WordPress腾讯云对象存储COS插件支持数据库定时备份、附件实时同步到COS、网站静态资源CDN加速等功能。支持手动、定时任务自动备份数据库,保留30个备份版本;附件实时同步到腾讯COS,支持初始化同步将安装插件前已...
ftp-post:上传的静态资源到cdn服务器的插件包
科汛cms自动生成首页静态插件可定时生成,适合v7,v8版本,静态符合seo,特别是访问量大的网站,为节省服务资源更要生成静态。然而当科汛cms把首页设置时,虽然当没有首页文件时自动回生成,但是不能定时生成,导致...
.net为静态插件,有兴趣的可以看看 资源名:MSDNURLRewriting.msi
科汛cms自动生成首页静态插件可定时生成,适合v7,v8版本,静态符合seo,特别是访问量大的网站,为节省服务资源更要生成静态。然而当科汛cms把首页设置时,虽然当没有首页文件时自动回生成,但是不能定时生成,导致...
##为了更好的使用对静态资源进行版本管理,特有如下注意事项以及说明 样式文件相关 css样式文件中支持相对路径,但是前提是不能在路径外边加引号。 不要在css样式文件中添加类似@charset "uft-8";的声明。 requirejs...
静态资源管理 插件 环境变量和模式 学习目标 目录 目录 知识架构 7.1 Vue CLI脚手架工具 知识架构 7.2 插件 知识架构 7.3 CLI服务和配置文件 知识架构 7.4 环境变量和模式 知识架构 7.5 静态资源管理 7.2 插件 在Vue...
一、WordPress 七牛云对象存储(简称:WPQiNiu),基于七牛云对象存储与 WordPress 实现静态资源到对象存储中,让静态资源包括图片、附件分离 WordPress 根目录,提高网站打开速度。 插件特点 新增支持图像自定义...
某资源社网站用的是xiuno知乎蓝模板的魔改版,模板比较简介,适合做各种论坛,而且非常美观简洁! 文件里面有两个一个是xiuno程序一个是模板插件,模板是原版,无毒!!无后门。 搭建教程: 环境要求 ...
一键抓取网站静态资源,网站拷贝模仿的神器
该资源支持高德地图,百度地图,腾讯地图,使用方便,支持智能搜索,经纬度定位等共功能,移植性高。是一款特别适合前端使用的插件以及后台快速开发使用的插件。
CandyWebCache是移动端web资源的本地缓存解决方案,能够拦截webview的请求,并优先使用本地缓存静态资源进行响应,以此来对webview加载页面性能进行优化。 特点: 协议层拦截请求,透明替换响应 静态资源版本控制及...
Stylus Grails 资产管道Grails stylus-asset-pipeline是一个插件,它为资产管道静态资产管理插件提供支持。 大部分是从复制的有关如何使用资产管道的更多信息,请访问。 通过模拟 Node.js 的文件系统导入和需要工作...