【发布时间】:2015-09-10 11:19:33
【问题描述】:
我试图从我的 JSP 页面中的 pom.xml 打印应用程序版本。我尝试将过滤与 Spring Boot 结合起来。 但是这些值不会在 jsp 页面中呈现。
我在 pom.xml 中添加了以下部分。
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>src/main/resources/templates</directory>
<filtering>true</filtering>
</resource>
</webResources>
</configuration>
</plugin>
并在jsp页面中添加了以下内容:-
<h4>${project.description}</h4>
<h4>${project.name}</h4>
<h4>${project.version}</h4>
但是当 JSP 页面呈现时,标签是空的,里面没有值。
【问题讨论】:
标签: java spring maven spring-boot