grails-2.2

Change login page for spring security plugin in grails

ぃ、小莉子 提交于 2020-01-12 04:44:10
问题 Is there a way that I can create my own custom login page and send the data to login controller of spring security plugin. I currently see my code redirecting directly to the default login page of spring security plugin. 回答1: The 2.0 plugin comes with its own auth.gsp page, so if you create your own (either modify the plugin's or create your own) and put it in grails-app/views/login/auth.gsp it will be used. In 1.2.x the auth.gsp is in your app source, so edit it there. If you want to further

How to add maven plugin to grails 2.2 app?

泪湿孤枕 提交于 2019-12-25 00:46:05
问题 I want to add the following barcode plugin to my grails 2.2 app. https://mvnrepository.com/artifact/com.google.zxing/core/3.3.0 I have tried compile 'com.google.zxing:core:3.3.0' I have also tried 'com.google.zxing:core:jar:3.3.0' but it doesn't resolve dependency. It says Error | Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information): - com.google.zxing:core:3.3.0 Here is the full BuildConfig file grails.servlet.version = "2.5" // Change depending

meta replacing same method in two different tests not working?

妖精的绣舞 提交于 2019-12-20 06:17:01
问题 Test controller is as follows def justTest(){ def res = paymentService.justTest() [status: res.status] } Test service method is as follows def justTest(){ } Now the two test cases are as follows. Payment service method justTest was modified in both cases to return two different values. @Test void test1(){ PaymentService.metaClass.justTest = {['status': true]} def res = controller.justTest() assertEquals(res.status, true) GroovySystem.metaClassRegistry.removeMetaClass(PaymentService.class) }

Is there any limit on the number of parameters allowed in POST request to the server in Grails?

你。 提交于 2019-12-12 03:09:34
问题 I am getting null pointer excetion when trying to access a POST parameter passed to controller. I am printing the params from controller as follows: def sendEmail(){ println "printing params" println params And I am getting below output Output: printing params [_participant:[, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Is it possible to convert a simple grails application to OSGi bundle that can run in Adobe CQ? [closed]

随声附和 提交于 2019-12-11 05:30:54
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have a simple Grails 2.2.4 application that simply lists a bunch of items on a page. So I only have one controller and I'm not even using the database. Now, I want to convert this application into an OSGi sling bundle so that I can run it under Adobe CQ. when I prepare the Grails app it creates a WAR file..

Grails 2.2.4 unresolved dependencies commons-imaging

ⅰ亾dé卋堺 提交于 2019-12-09 20:35:07
问题 So I'm kinda lost here. I've had the same BuildConfig for over a month, and since the beginning of the week I have the following problem: I'm trying to use the Apache commons-imaging 1.0-SNAPSHOT in my grails 2.2.4 project using the following configuration: BuildConfig.groovy repositories{ ... mavenRepo 'http://repository.apache.org/snapshots' ... } dependencies{ ... compile 'org.apache.commons:commons-imaging:1.0-SNAPSHOT' ... } But every now and then, after running the grails clean command

broken pipe exception with MySql in Grails app

余生颓废 提交于 2019-12-08 15:19:09
问题 I have deployed a Grails 2.2.1 application to a remote server. After a few hours, when I access to home page of the application, I see the following exception: Error 500: Internal Server Error URI /DocGemStudioZoccali/ Class java.net.SocketException Message Broken pipe Trace Line | Method ->> 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker ^ 722 |

Howto get a map from params in Grails Controller?

喜夏-厌秋 提交于 2019-12-08 03:40:03
问题 I'm trying to retrieve in the controller a complex object sent from the client (via ajax) in JSON format, but I don't know how to get from params the map in which are converted some of the properties. For example, imagine this is the "complex" JSON object (the number of items in the meta object is variable, could be one, two, three... and with variable names): { language: "java", meta: { category: "category1" } } When this object is sent via jQuery, in the controller I get this in params

Custom Plugin transitive Dependency resolution in BuildConfig.groovy Grails 2.2.3

爱⌒轻易说出口 提交于 2019-12-06 06:42:32
问题 tl;dr version Dependencies of my custom grails plugin weren't getting inherited and resolved by projects I installed the plugin to. Install the latest version of the release plugin to your plugin (fixes the issue for jar dependencies) Clear out any references to plugins that might exist in your BuildConfig.groovy file (fixes the issue for plugin dependencies) grails maven-install to make the plugin available in the mavenLocal() source Long version So, I've been trying to create a custom

Applying Groovy extensions in Grails produces MissingMethodException for String#toBoolean()

馋奶兔 提交于 2019-12-05 00:33:11
问题 Background Groovy have the feature of adding methods to the existing classes, and I've found some interesting ones. Then I discovered that I need to customize my Grails bootstrap to load them, so I add: def init = { servletContext -> addExtensionModules() } def addExtensionModules() { Map<CachedClass, List<MetaMethod>> map = [:] ClassLoader classLoader = Thread.currentThread().contextClassLoader try { Enumeration<URL> resources = classLoader.getResources(MetaClassRegistryImpl.MODULE_META_INF