Spring启动Tomcat - 启用/禁用目录列表

时间:2017-05-30 06:15:37

标签: tomcat spring-boot

我有spring boot个申请,我使用embedded tomcat作为网络服务器。 我有列出目录的问题。 我现在想在嵌入式tomcat中如何enable or disable listing directories。 在没有弹簧启动应用程序的情况下,我们可以在web.xml中添加以下代码:

<init-param>
       <param-name>listings</param-name>
       <param-value>false</param-value>
</init-param>

如何在spring boot中列出Enable/disable目录?

我在stackoverflow中只找到了下面的问题,但没有帮助。

  

Embedded Tomcat directory listing for spring-boot application

1 个答案:

答案 0 :(得分:0)

说到 SELECT user.userID, user.username, SUM(a.commthumbs+b.commthumbs+c.commthumbs+d.commthumbs) AS 'commthumbs', e.fixthumbs AS 'fixthumbs' FROM user LEFT JOIN ( SELECT userID, IFNULL(SUM(gameCommThUp-gameCommThDown),0) AS 'commthumbs' FROM gamecomm GROUP BY userID) a ON a.userID = user.userID LEFT JOIN ( SELECT userID, SUM(fixCommThUp-fixCommThDown) AS 'commthumbs' FROM fixcomm GROUP BY userID) b ON b.userID = user.userID LEFT JOIN ( SELECT userID, SUM(replyCommThUp-replyCommThDown) AS 'commthumbs' FROM gamereply GROUP BY userID) c ON c.userID = user.userID LEFT JOIN ( SELECT userID, SUM(fixReplyThUp-fixReplyThDown) AS 'commthumbs' FROM fixreply GROUP BY userID) d ON d.userID = user.userID LEFT JOIN ( SELECT userID, SUM(fixThUp-fixThDown) AS 'fixthumbs' FROM fix GROUP BY userID) e ON e.userID = user.userID WHERE user.userID = 2; ,几乎所有东西都可以通过配置文件进行微观管理。

您可以使用以下属性将spring-boot值传递到嵌入式容器

init-param

在你的情况下,

server.servlet.jsp.init-parameters.*= # Init parameters used to configure the JSP servlet.