将静态客户端文件放在Maven项目中的位置 [英] Where to place static client side files in maven project

查看:339
本文介绍了将静态客户端文件放在Maven项目中的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个新的简单的Maven项目.我在此处找到的项目结构中,但是没有说明放置.js, .sql, .html, .css, .jsp文件的位置.我该在Maven项目中的何处放置静态客户端文件(例如这些文件)?

I created a new simple maven project. I was following the project structure found here, however, it doesn't state where to place .js, .sql, .html, .css, .jsp files. Where do I place static client side files such as these in my maven project?

这是我现在拥有的项目结构:

Here is the project structure that I have now:

此外,此问题与重复发布的问题有所不同,因为我的问题涉及常规静态文件,而另一个问题涉及诸如javascript之类的特定文件.请重新打开.

Also, this question is different from the one posted as a duplicated since my question involves general static files whereas the other question involves specific files like javascript. Please reopen.

推荐答案

如果使用WAR打包,请在webapp中.如果您使用的是JAR包装,请在resources中.

If you are using WAR packaging, in webapp. If you are using JAR packaging, in resources.

编辑:.sql文件应始终位于resources

这篇关于将静态客户端文件放在Maven项目中的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆