Info endpoint - application.yml maven program does not work

We are using spring boot 1.3.1. I have the following data in the application.yml file.

info:
  build:
    artifact: ${project.artifactId}
    name: ${project.name}
    description: ${project.description}
    version: ${project.version}

I create a war file and deploy it to tomcat. When I access the endpoint / info, I don’t see the values ​​being replaced.

I do not use 'spring-boot-maven-plugin' since I do not need to run the application autonomously.

Does YML filtering work by default?

Also, is there an example of showing the version of an application in a banner.txt file using the maven project.version property?


After the Dave comment, I updated the application.yml file as shown below and it works.

info:
  build:
    artifact: @project.artifactId@
    name: @project.name@
    description: @project.description@
    version: @project.version@

, , application.version tomcat banner.txt. Tomcat manifest.mf. Spring : https://github.com/spring-projects/spring-boot/issues/3406

+4
2

, maven . spring -boot-starter, , @..@ not ${..}.

+3

, spring ,

version: @project.version@ . version: #project.version# .

pom:

<parent>
    <artifactId>spring-boot-starter-parent</artifactId>
    <groupId>org.springframework.boot</groupId>
    <version>1.4.1.RELEASE</version>
    <relativePath />
</parent>
+1

Source: https://habr.com/ru/post/1626030/


All Articles