How to load external config files in Grails3

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to load external config files in Grails3

Joud Kassem
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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: How to load external config files in Grails3

Ronny Løvtangen
For Grails 3 I recommend using this plugin: https://github.com/sbglasius/external-config

On 13 Nov 2018, at 12:35, Joud Kassem <[hidden email]> 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 [hidden email].
To post to this group, send email to [hidden email].
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/201EE2BD-F1A3-41E8-96FC-673F547F16BF%40lovtangen.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to load external config files in Grails3

Joud Kassem
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: <a href="https://github.com/sbglasius/external-config" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fsbglasius%2Fexternal-config\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF9_2u5HBA3XzJxveRh5TB9ugp4wg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fsbglasius%2Fexternal-config\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF9_2u5HBA3XzJxveRh5TB9ugp4wg&#39;;return true;">https://github.com/sbglasius/external-config

On 13 Nov 2018, at 12:35, Joud Kassem <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="pFjFmaB4AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">joud.k...@...> 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="pFjFmaB4AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-dev-discuss+unsubscribe@....
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="pFjFmaB4AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-de...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/grails-dev-discuss/68f02af3-3a79-48cf-aa47-f36a8bea5d9c%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/68f02af3-3a79-48cf-aa47-f36a8bea5d9c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/68f02af3-3a79-48cf-aa47-f36a8bea5d9c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/grails-dev-discuss/68f02af3-3a79-48cf-aa47-f36a8bea5d9c%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/da4973d4-1aa4-4d55-a449-7facb4108b0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to load external config files in Grails3

ajayjain01
In reply to this post by Joud Kassem
Hi,

You can follow the discussion on below google group

https://groups.google.com/forum/#!topic/grails-dev-discuss/_5VtFz4SpDY



On Tuesday, 13 November 2018 17:05:43 UTC+5:30, Joud Kassem 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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/8d866155-dbeb-4b41-b556-e850dfd5fd4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.