Grails Resource Plugin and Cloud

I tried to deploy my cloud access application, everything is going smoothly, but none of my static resources using the resource plugin were found.

In the logs I get a lot of errors as shown below

2012-01-31 13: 36: 41,352 [http-46220-3] WARN util.ResourceMetaStore - Could not find resource [/static/css/jquery-ui-1.8.17.custom.css]

At first I thought that this is due to the fact that cloudfoundry does not have allocated disk space, but based on this stream, it should work out of the box

http://grails.1312388.n4.nabble.com/Cloud-foundry-and-resources-plugin-with-js-css-td4243619.html

The test application runs on a single instance, and I use version 1.1.6 of the resource plugin.

Does anyone else run into similar issues?

+4
source share
4 answers

Make sure your Config.groovy does not have the following line

grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*'] 
+5
source

I had a similar problem on heroku platform. The problem seems to be related to resource plugins and load balancing. My will be the following:

Heroku, Grails: Missing resources when using multiple web dinosaurs

0
source

Can you confirm 100% that this works in a production environment locally?

0
source

I have a Grails 2.0 app in Cloud Foundry (http://tripplanner-ali.cloudfoundry.com/trip/create). It uses the resource plugin (1.1.5), along with cloud support and cloud foundry and jquery, of course. I would suggest you set up your STS with Grails 2.0 if you haven’t done so, and try to create a sample application and deploy it to CF. Here you can get STS with Grails 2.0 (http://static.springsource.org/sts/docs/2.7.0/reference/html/grails/grails20.html).

Once you have this setting, all you have to do is create a new Grails project, and by default you will get the resource plugin along with jquery.

0
source

Source: https://habr.com/ru/post/1393988/


All Articles