【问题标题】:I have few files in a folder, how can I save the path of the files into database by using spring mvc?我的文件夹中的文件很少,如何使用spring mvc将文件的路径保存到数据库中?
【发布时间】:2016-11-22 03:21:12
【问题描述】:

This is my project folder structure

我想使用spring mvc将文件路径保存到数据库中

【问题讨论】:

  • 欢迎来到 StackOverflow!请在此处的帖子中包含代码,因为如果 URL 更改,链接可能会很快/很容易过时。这使您的帖子没有任何形式的支持您正在谈论的内容

标签: java mysql spring spring-mvc jdbctemplate


【解决方案1】:

您可以使用ServletContext.getRealPath()。请参阅this question 的第一个答案。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-04
    • 1970-01-01
    相关资源
    最近更新 更多