How can I get the version of the application (defined by tag version im pom) in quarkus specially?

前端 未结 2 1141
夕颜
夕颜 2021-01-28 02:48

I moved from a plain Java EE application to quarkus.io. In Java EE I had the a properties file with version=${project.version} and reeading this file in an JAX RS

2条回答
  •  醉梦人生
    2021-01-28 03:20

    Try

    
    @ConfigProperty(name = "quarkus.application.version")
    String version;
    

    Also you can read the Implementation-Version from the manifest.

提交回复
热议问题