maven项目没有application.properties
时间: 2023-09-22 09:11:38 浏览: 211
在新建的maven项目中,如果没有看到application.properties的配置文件,可以进行以下几个步骤来解决问题。首先,确保你的pom.xml文件中已经引入了springboot的依赖。接着,打开File菜单,选择Project Structure,然后在对应的模块中右键点击"Add",选择Spring和Web功能进行添加。再次确认一下resources文件夹是否已经被添加为Resources类型,可以在右侧的面板中查看是否已经添加成功。如果仍然没有解决问题,可能是因为maven引入的依赖没有被正确打包编译。此时,可以删除项目中的.iml文件,并在IDEA的maven面板中重新import项目,重新生成.iml文件。等待一段时间,.iml文件重新生成后,配置文件中的依赖包属性就可以正常提示了。通过以上步骤,你应该能够解决maven项目中缺失application.properties的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Spring boot中没有application.properties的解决方式](https://blog.csdn.net/libra_ts/article/details/78866419)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [springboot 基础简易实例, maven项目](https://download.csdn.net/download/kingwin28/11229434)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [Maven模块中application.properties配置文件没有高亮显示以及缺少部分提示](https://blog.csdn.net/mrzhuangwy/article/details/108039933)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文
相关推荐
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![7z](https://img-home.csdnimg.cn/images/20241231044736.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![7z](https://img-home.csdnimg.cn/images/20241231044736.png)
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)