【问题标题】:Where is the work directory of embedded tomcat for a spring boot / spring mvc application?spring boot / spring mvc应用程序的嵌入式tomcat的工作目录在哪里?
【发布时间】:2019-04-15 00:47:34
【问题描述】:

想问一下在哪里可以看到一个spring boot/spring mvc applicaiton的工作目录。具体来说,我想知道转换为 java 文件的 Transpiled JSP 文件。

我可以看到目标目录中的类文件,但找不到转译的jsp文件。有没有可以在我的环境中看到的班级电话?像 System.getProperty("user.dir") 或 new java.io.File(".").getCanonicalPath()。我都试过了,它只显示了代码路径。

另外,我知道 Eclipse 服务器路径。但是在spring boot中,它似乎并没有使用tomcat的服务器实例运行。那么下面的路径不存在?

下面的目录也是空白的。

projectworkspace/.metadata/.plugins/org.eclipse.wst.server.core/

【问题讨论】:

    标签: spring-boot spring-mvc jsp


    【解决方案1】:

    基本目录是通过属性server.tomcat.basedir 设置的,请参阅:https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-application-properties.html

    工作目录是通过附加 /work 从那里派生的。

    【讨论】:

      猜你喜欢
      • 2016-05-02
      • 2016-04-28
      • 2017-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-18
      • 2018-05-29
      • 1970-01-01
      相关资源
      最近更新 更多