前言

​博主github​

​博主个人博客http://blog.healerjean.com​

针对于刚刚新创建的maven项目中没有resource文件夹,当我在设计一个service接口层的时候,没有考虑过放入资源文件,所以一开始没有创建resource文件夹,但是后来需要做一个freemarker模板项目,我需要一个文件夹来存放静态资源html模板文件

1、设置-> Project Structer

SpringBoot项目创建Resource文件夹_右键

2、Modules–>Sources–>main右键–>New Folder, 输入resources

[外链图片转存失败(img-XFGSGlBg-1566804633963)(https://raw.githubusercontent.com/HealerJean/HealerJean.github.io/master/blogImages/1557727726716.png)]

SpringBoot项目创建Resource文件夹_外链_02

3、选择resources右键,点击Resources(选择文件资源类型),然后Apply,OK即可(添加test也一样)

[外链图片转存失败(img-dH77lDTR-1566804633964)(https://raw.githubusercontent.com/HealerJean/HealerJean.github.io/master/blogImages/1557727765572.png)]

4、成功

SpringBoot项目创建Resource文件夹_Maven_03

SpringBoot项目创建Resource文件夹_Maven_04