Note that there are some explanatory texts on larger screens.

plurals
  1. POGrails config of Spring beans in different files
    primarykey
    data
    text
    <p>Grails have cofig for spring bean called <code>resources.groovy</code>. And as i understand from docs it allows you to include another file, using loadBeans(%path%)</p> <p>I'm tried with this:</p> <pre><code>println 'loading application config ...' // Place your Spring DSL code here beans = { loadBeans("classpath:security") //i'm tried with "spring/security" and "spring/security.groovy" also } </code></pre> <p>but when grails is running it log following error:</p> <pre><code>Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Error evaluating bean definition script: class path resource [security] cannot be opened because it does not exist Offending resource: class path resource [security]; nested exception is java.io.FileNotFoundException: class path resource [security] cannot be opened because it does not exist at grails.spring.BeanBuilder.loadBeans(BeanBuilder.java:470) at grails.spring.BeanBuilder.loadBeans(BeanBuilder.java:424) at resources$_run_closure1.doCall(resources.groovy:13) at resources$_run_closure1.doCall(resources.groovy) ... 45 more </code></pre> <p>Script <code>security.groovy</code> is exists at <code>grails-app/conf/spring</code> and compiled by <em>grails maven plugin</em> into <code>target/classes/security.class</code>. Directory <code>target/resources/spring</code> is empty at this time</p> <p>How i can configure Grails or grails-maven-plugin to copy this config files, not compile it into classes?</p> <p>p.s. this problem also presents when i try to include config scripts using <code>grails.config.locations = [ %path% ]</code> inside <code>conf/Config.groovy</code>, my groovy scripts compiles into classes and because of it, grails config builder can't find them :(</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload