我正在使用JasperReports使用彈簧。我正在給客戶以pdf和csv格式下載報告的機會。但我的要求是在下載提示我需要顯示日期和時間的文件名。但是我只能顯示文件名。如何在下載時顯示日期和時間的文件名?如何給文件名添加日期和時間
我使用下面的代碼在我碧玉views.xml:
<bean id="test-pdf"
class="org.springframework.web.servlet.view.jasperreports.JasperReportsPdfView"
p:url="classpath:reports/testreport.jrxml"
p:reportDataKey="datasource">
<property name="headers">
<props>
<prop key="Content-Disposition">
attachment; filename=TestReport.pdf
</prop>
</props>
</property>
</bean>
如何添加日期和時間到文件名,而下載?