grails-config

How to get Grails application name within Config.groovy?

眉间皱痕 提交于 2019-12-20 10:39:40
问题 I want to include the Grails application name in some of my configuration settings in grails-app/Config.groovy . I've tried many ways without success. For example, if I have the following in my Config.groovy , edu.appname1 = "${grailsApplication.metadata.'app.name'}" edu.appname2 = "${application.metadata.'app.name'}" edu.appname3 = "${metadata.'app.name'}" edu.appname4 = "${app.name}" I can run these statements in the Grails console def edu = grailsApplication.config.edu println "${'''$

How to get Grails application name within Config.groovy?

被刻印的时光 ゝ 提交于 2019-12-02 23:42:16
I want to include the Grails application name in some of my configuration settings in grails-app/Config.groovy . I've tried many ways without success. For example, if I have the following in my Config.groovy , edu.appname1 = "${grailsApplication.metadata.'app.name'}" edu.appname2 = "${application.metadata.'app.name'}" edu.appname3 = "${metadata.'app.name'}" edu.appname4 = "${app.name}" I can run these statements in the Grails console def edu = grailsApplication.config.edu println "${'''${grailsApplication.metadata.'app.name'} -> '''}${edu.appname1}" println "${'''${application.metadata.'app

How to exclude grails global dependency

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 13:59:06
Grails has bouncycastle:bcprov-jdk14:138 as global dependency +--- org.grails:grails-docs:2.3.3 | \--- org.xhtmlrenderer:core-renderer:R8 | \--- org.yaml:snakeyaml:1.8 | \--- org.grails:grails-gdoc-engine:1.0.1 | \--- com.lowagie:itext:2.0.8 | \--- bouncycastle:bcmail-jdk14:138 | \--- bouncycastle:bcprov-jdk14:138 | \--- commons-lang:commons-lang:2.6 But my app need bcprov-jdk15on-149. When I added it as dependency it doesn't evict old version dependencies { build 'org.bouncycastle:bcpg-jdk15on:1.49' build 'org.bouncycastle:bcprov-jdk15on:1.49' } I tried a lot of variants to exclude it but no

Quartz job triggering from Config.groovy

淺唱寂寞╮ 提交于 2019-11-29 05:17:05
I have the following Quartz job running in my application: class ScraperJob { def scraperService static triggers = { cron name: 'scraperTrigger', cronExpression: "0 0 * * * ?" // run every minute } def execute(){ try { scraperService.storing() log.info "${new Date()} - Scraping went smoothly." } catch(IOException) { // Connexion problem log.error "${new Date()} - Method: parsing >> Connexion down or interrupted while parsing !" } catch(SAXException) { // Any SAXParser exception log.error "${new Date()} - Method: parsing >> Parser error." } finally { // if not closed, the application crashes

How to exclude grails global dependency

*爱你&永不变心* 提交于 2019-11-28 07:27:11
问题 Grails has bouncycastle:bcprov-jdk14:138 as global dependency +--- org.grails:grails-docs:2.3.3 | \--- org.xhtmlrenderer:core-renderer:R8 | \--- org.yaml:snakeyaml:1.8 | \--- org.grails:grails-gdoc-engine:1.0.1 | \--- com.lowagie:itext:2.0.8 | \--- bouncycastle:bcmail-jdk14:138 | \--- bouncycastle:bcprov-jdk14:138 | \--- commons-lang:commons-lang:2.6 But my app need bcprov-jdk15on-149. When I added it as dependency it doesn't evict old version dependencies { build 'org.bouncycastle:bcpg

Quartz job triggering from Config.groovy

本小妞迷上赌 提交于 2019-11-27 22:47:02
问题 I have the following Quartz job running in my application: class ScraperJob { def scraperService static triggers = { cron name: 'scraperTrigger', cronExpression: "0 0 * * * ?" // run every minute } def execute(){ try { scraperService.storing() log.info "${new Date()} - Scraping went smoothly." } catch(IOException) { // Connexion problem log.error "${new Date()} - Method: parsing >> Connexion down or interrupted while parsing !" } catch(SAXException) { // Any SAXParser exception log.error "$