父工程添加配置如下
<build>
<finalName>microservicecloud</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<delimiters>
<delimit>$</delimit>
</delimiters>
</configuration>
</plugin>
</plugins>
</build>
子pom.xml $为上面配置的
info: app.name: atguigu-microservicecloud company.name: www.atguigu.com build.artifactId: $project.artfacId$ build.version: $project.version$