Home redirect() does not resolve @info.app.name@ in Grails when started with gradle bootRun
Reply: 0

redirect() does not resolve @info.app.name@ in Grails when started with gradle bootRun

user1216
1#
user1216 Published in June 19, 2018, 4:29 pm

I just upgraded a Grails 2 project to Grails 3 and I have some problems resolving @info.app.name@ running with ./gradlew bootRun. In my application.yml I have this:

info:
    app:
        name: '@info.app.name@'
        version: '@info.app.version@'
        grailsVersion: '@info.app.grailsVersion@'

In my Controller I have:

def index = {
    redirect(action: 'invoices')
}

Running the application in Tomcat, this works fine and /profakt/invoiceSheet/index is redirected correctly to /profakt/invoiceSheet/invoices.

Running the application with ./gradlew bootRun the application name is not resolved correctly and the redirect is trying to redirect to /@info.app.name@/invoiceSheet/invoices.

I noticed that, if I remove this line from my build.gradle, it works again:

bootRun {
    systemProperties = System.properties
}

But I would really like to keep this line, to be able to configure some (db) urls with environment variables.

Any idea how I use System.properties with bootRun?

You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO