grails-2.0

Error in Spring Security core plugin while upgrading grails from 1.3.x to 2.0.4

女生的网名这么多〃 提交于 2019-12-12 01:43:39
问题 I have a app developed in grails 1.3.x and I upgraded to 2.0.4, There was an dependency error in the spring security plugin, so i did grails install-plugin spring-security-core , It installed 1.2.7.3 version. Then I ran the grails application, I got the below error. Compilation error: startup failed: Compile error during compilation with javac. C:\Users\Vinay.hs\.grails\2.0.4\projects\steer\plugins\spring-security-core-1.2.7.3\src\java\org\codehaus\groovy\grails\plugins\springs ecurity

How to run grails commands after deploying war to tomcat in production?

流过昼夜 提交于 2019-12-11 19:38:09
问题 I have a grail-2.4.5 based application. The artifact, a WAR file, is deployed to production; the application runs great. Now I would like to run some grails commands related to the database-migration plugins: specifically grails dbm-tag and grails dbm-rollback . I'm at a loss at how to do this. Any suggestions would be very welcome; is there a better way to do this? Versions: Grails 2.4.5 Tomcat 8.0.24 Constraints: This is a 12 Factor style application so no configs are stored in the

Error loading Neo4j from grails app

▼魔方 西西 提交于 2019-12-11 19:06:09
问题 I am using Grails 2.0.1 and Neo4J 1.8, and would like to instantiate a Neo4j database in my spring resources file like this: import org.codehaus.groovy.grails.commons.ConfigurationHolder as CH; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.factory.GraphDatabaseFactory; import org.neo4j.graphdb.factory.GraphDatabaseSettings; // Place your Spring DSL code here beans = { GraphDatabaseService db = getGraph(); enronService(com.fxpal.neo4j.EnronService) { graph = db; index

What is the best way to generate HTML mail templates for the Grails mail plugin?

巧了我就是萌 提交于 2019-12-11 13:32:11
问题 With the Grails Mail plugin you can either send plain text or html mails. When sending html mails like this: sendMail { to "fred@g2one.com" subject "Hello John" html(view: htmlTemplate, model: args) } It is recommended to make css inline in mail html, because it will be accepted by more mail clients. The problem is, that these html files are hard to read and maintain. Is there a way to generate these mail templates in a smarter way than writing inline css? What is a best practice to generate

Can I list all of the dataSources available?

丶灬走出姿态 提交于 2019-12-11 13:11:51
问题 I would like to iterate over all the available dataSources for the current environment, trying to see if any of them contain a particular domain instance. Each environment has different dataSources. The best I've hacked up so far is grailsApplication.config.findAll { it.key.contains('dataSource_') } . Is there a better or more legitimate way to do this? 回答1: You can also query against the bean names in the application context. Something like ctx.beanDefinitionNames.findAll{ it.contains(

Grails + Mongo: GORM mysteriously thinks a object referenced by an embedded field has a changed propery

别说谁变了你拦得住时间么 提交于 2019-12-11 12:30:09
问题 I have a domain class called Form which has an embedded field called union of type Organization which is embedded. Organization has the field createdByUser . User has a field organization of type Organization added by AST transformation. So, whenever i try to save a Form object, it tries to change the user reference by createdByUser to an organization id of 1 for mysterious reasons. 来源: https://stackoverflow.com/questions/30714307/grails-mongo-gorm-mysteriously-thinks-a-object-referenced-by

Placement Of JS Resource Via <r:external />

北慕城南 提交于 2019-12-11 11:19:22
问题 I'm using the Resources plugin in Grails 2.0.1. The issue I'm having is getting a JavaScript resource specified using r:external to be placed after all of the other script previously declared using either r:require or r:external, all in the deferred disposition. Currently the resource specified using r:external it is being output in the location where the r:external tag is placed. I have a layout file that contains an r:require tag to fetch some core resources: <html> <head> ... <r:require

Using a legacy Neo4j database with Grails

爷,独闯天下 提交于 2019-12-11 10:48:59
问题 I would like to use the ENRON GraphML dataset, loaded into Neo4j, as a database for my Grails 2.0 application. The use-case for the data is read-only. I have had no trouble loading the dataset and creating a database in a stand-alone application, and now would like to use the Grails plugin to manage access to the database. Looking at the Neo4J plugin documentation on mapping domain classes, I see that it requires subreference nodes for each type of vertex. My data doesn't have that. I can see

How can I define Settings and Analyzer for ElasticSearch?

懵懂的女人 提交于 2019-12-11 10:41:19
问题 I am using Grails with the ElasticSearch Plugin. It works fine, but I need to define the settings and analyzer. How can I do that? I want to use the following settings and mappings: { "settings" : { "index" : { "analysis" : { "analyzer" : { "autocomplete" : "engram", "filter" : ["lowercase"] } }, "tokenizer" : { "engram" : { "type" : "edgeNgram", "min_gram" : 3, "max_gram" : 10 } } } } }, "mappings" : { "contacts" : { "name" : { "index" : "string", "index_analyzer" : "autocomplete", "index" :

How to nest plugin URLs?

☆樱花仙子☆ 提交于 2019-12-11 09:36:30
问题 I would like to create a "Shell" of a Grails project that hosts functionality in plugins, with the URLs segregated by plugin name. So the URLs for a Blog plugin used in the Shell project might look like: /shell/blog/viewBlogPost But what I'm actually seeing is all of the plugins' controllers behave as if they are part of the shell project itself: /shell/viewBlogPost Is there any way to declare that the Blog plugin's controllers be accessible only under a /blog path in the URL? 回答1: It seems