Java 在Thymeleaf中等效
我已经使用Spring初始值设定项、嵌入式Tomcat、Thymeleaf模板引擎和作为可执行JAR文件的包生成了一个Spring引导web应用程序 使用的技术: 弹簧靴2.0.0.M6,Java 8,maven 我在application.properties中定义了此属性 我想知道在我的Thymeleaf模板中是否有与Java 在Thymeleaf中等效,java,spring,spring-boot,thymeleaf,Java,Spring,Spring Boot,Thymeleaf,我已经使用Spring初始值设定项、嵌入式Tomcat、Thymeleaf模板引擎和作为可执行JAR文件的包生成了一个Spring引导web应用程序 使用的技术: 弹簧靴2.0.0.M6,Java 8,maven 我在application.properties中定义了此属性 我想知道在我的Thymeleaf模板中是否有与 <a href="/<%=request.getContextPath()%>/iberiaReport/download"> 您可以使用获取ser
<a href="/<%=request.getContextPath()%>/iberiaReport/download">
您可以使用获取server.servlet.context-path
你可以直接写
<a href="@{/iberiaReport/download}">
您可以使用获取server.servlet.context-path
你可以直接写
<a href="@{/iberiaReport/download}">
只是一个小更正:它将是:,使用th:href而不是简单的href。只是一个小更正:它将是:,使用th:href而不是简单的href
<a href="@{/iberiaReport/download}">