Home How to automatically reload installed scaffolding templates in Grails 3.3?
Reply: 0

How to automatically reload installed scaffolding templates in Grails 3.3?

saw303
1#
saw303 Published in 2018-01-11 06:46:32Z

This question is actually a follow up that question adressing this issue in Grails 2.x. Since Grails 3.x is completely different to Grails 2.x it would like to ask for your advise.

My application runs Grails 3.3 and the Grails scaffolding plugin 3.4.1.

As a workaround I tried to lookup the ScaffoldingViewResolver within Springs application context to clear the scaffold view cache and force a reload of my modified installed templates.

def refresh() {

    if (Environment.current == Environment.DEVELOPMENT) {

        ScaffoldingViewResolver resolver = applicationContext.getBean(ScaffoldingViewResolver)
        resolver.clearCache()
    }
    render status: 200
}

But this results in a NoSuchBeanDefinitionException.

How can I force Grails to reload my installed scaffolding templates from src/main/templates/scaffolding?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.361019 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO