This message was deleted.
# questions
s
This message was deleted.
r
Thanks @Groovy Duke - that's interesting. It could be that the
BuildProperties
bean has been deprecated in favour of
/actuator/info
but that would be a breaking change. As a workaround, is there a way to access
META-INF/build-info.properties
directly from Grails?
Curiouser and curiouser - I enabled the
/actuator/info
endpoint and got some entirely fictitious output:
Copy code
{
  "git": {
    "branch": "2.4.x",
    "commit": {
      "id": "54f3734",
      "time": 1691882715
    }
  }
}
I'm not using git and this is not the content of
build-info.properties
so what is going on?
g
Well, the actuator is a Spring thing, so it is very possible that they broke or changed something. Some of the most frustrating issues I've encountered when upgrading Grails had nothing to do with Grails but with Spring. I don't know a lot about this other than the usage that I've seen. Although seeing git info is strange because usually to get that I've always had to add a gradle plugin. Specifically this one: https://plugins.gradle.org/plugin/com.gorylenko.gradle-git-properties While not officially on the team, I do sit in on a Grails team meeting so I can ask about this pick their brains a little and see what they know.
One thought that might get you some of what you want in-app in the Grails Metadata class: https://docs.grails.org/6.0.0/api/grails/util/Metadata.html
r
Thank you - I realise this is likely to be a Spring Boot issue, but I wondered if Grails was overriding the default behaviour in some way, so it would be helpful if you could ask the Grails team about this.
Unfortunately, what I'm really after is the source code revision number, so I don't think the Grails Metaclass can help.