How to load external config files in Grails3

23 views
Skip to first unread message

Joud Kassem

unread,
Nov 13, 2018, 6:35:43 AM11/13/18
to Grails Dev Discuss
Hi guys, I have few config files that are in grails-app/config and I load manually using Configuration.classLoader.loadClass(className), this used to work fine in Grails 2 but now in Grails 3, am getting ClassNotFoundException
What could be the problem? Did I miss something?

Ronny Løvtangen

unread,
Nov 13, 2018, 6:41:01 AM11/13/18
to grails-de...@googlegroups.com
For Grails 3 I recommend using this plugin: https://github.com/sbglasius/external-config

On 13 Nov 2018, at 12:35, Joud Kassem <joud.k...@gmail.com> wrote:

Hi guys, I have few config files that are in grails-app/config and I load manually using Configuration.classLoader.loadClass(className), this used to work fine in Grails 2 but now in Grails 3, am getting ClassNotFoundException
What could be the problem? Did I miss something?

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/68f02af3-3a79-48cf-aa47-f36a8bea5d9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joud Kassem

unread,
Nov 13, 2018, 7:40:07 AM11/13/18
to Grails Dev Discuss
Hi Ronny,
I'm using the external-config plugin for loading configuration that are in a folder outside my app folder but I have other config files in grails-app/config that I used to load then build manually using Configuration.classLoader.loadClass(className) in Grails 2, is this implemented differently in Grails3?


On Tuesday, November 13, 2018 at 12:41:01 PM UTC+1, Ronny Løvtangen wrote:
For Grails 3 I recommend using this plugin: https://github.com/sbglasius/external-config
On 13 Nov 2018, at 12:35, Joud Kassem <joud.k...@gmail.com> wrote:

Hi guys, I have few config files that are in grails-app/config and I load manually using Configuration.classLoader.loadClass(className), this used to work fine in Grails 2 but now in Grails 3, am getting ClassNotFoundException
What could be the problem? Did I miss something?

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-discuss+unsub...@googlegroups.com.

Ajay Jain

unread,
Nov 13, 2018, 8:33:40 AM11/13/18
to Grails Dev Discuss
Hi,

You can follow the discussion on below google group

Reply all
Reply to author
Forward
0 new messages