1.各模块在pom的build标签里面添加
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
2.修改pom里面的<version>0.0.7</version>,这个迭代时0.0.7
3.在application.yml里面添加- build info
application:
name:project.artifactId
version:project.version
build: dev
4.页面引用在foot.html 或foot.jsp
thymeleaf: th:text="${@componentVersionService.getFullVersion()}"
jsp:
<%
ComponentVersionService service = SpringBeansProvider.getBean("componentVersionService",ComponentVersionService.class);
request.setAttribute("version",service.getFullVersion());
%>
${version}