Announcement Announcement Module
Collapse
No announcement yet.
grails.serverURL in Config.groovy is ignored in STS run-app Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • grails.serverURL in Config.groovy is ignored in STS run-app

    Is there any way to have Springsource ToolSuite use the grails.serverURL when you use the grails run-app run configuration? I've changed

    Code:
     grails.serverURL = "http://localhost:8090/${appName}/"
    and when I call run-app from the tool, I get:

    Code:
    Server running. Browse to http://localhost:8080/${appName}
    It would make sense that, if you override the port number in Config.groovy, it would get picked up in run-app.

    Brian

  • #2
    grails.server.port.http = 8090 in BuildConfig.groovy will do the trick

    Comment


    • #3
      Brilliant

      That works great. Thanks for the tip!

      Brian

      Comment


      • #4
        But how about...

        It would be preferable to put the port number in application.properties, and then refer to it in BuildConfig.groovy.

        BuildConfig.groovy
        Code:
        grails.server.port.http = ${app.portNumber}
        application.properties
        Code:
        app.portNumber=8090
        I tried this to no avail.Any thoughts?

        Brian

        Comment


        • #5
          The intention behind application.properties is that only Grails should modify it. BuildConfig.groovy is the place for user configuration. Why do you want to put the setting in application.properties?

          Comment


          • #6
            Peter,

            I didn't know that configuration in BuildConfig.groovy was canonical, and that application.properties was not. I just had my thinking reversed, since property files seem to be a convenient place for configuring things like ports.

            I will adjust the brain and continue.

            Brian

            Comment

            Working...
            X