1.IDEA快速搭建SpringBoot项目
(1)IDEA快速搭建
如果是刚刚安装好的IDEA,双击打开之后点击create new project 左侧栏选中Spring Initializr ,选择你安装好的的jdk1.8,点击next。
如果你是已经创建过项目,在项目里头,请选中file-》new-》project 然后左侧栏选中Spring Initializr ,选择你安装好的的jdk1.8,点击next。
接下来是这个页面:
Group:填企业域名。
Artifact:填项目名称。
填写好这两项,其他默认即可,点击next。
Dependencies:添加项目中需要的依赖信息,目前只需选择 Web 即可。
然后点击next,点击finish。
打开之后为此窗口:
(2)配置Maven属性
点击file-》settings 然后搜索maven
在maven home directory处选中自己的maven路径
在user settings file处勾选override,然后选择自己maven路径下conf\settings.xml 然后点击ok。
温馨提示:如果maven路径下conf\settings.xml 还没有配置国内的镜像,请到我这篇文章进行配置。
https://blog.csdn.net/boywcx/article/details/82628703
(3)配置项目编码
点击file-》settings,然后搜索encoding
修改2个地方:
1.project encoding:选择UTF-8
2.defalut encoding for properties files:选择UTF-8
点击ok
通过配置,springboot项目搭建便完成了。也许你会疑问为什么不配置tomcat呢?因为在springboot中已经内置了tomcat,所以不需要进行配置。这也体现了springboot的快捷方便之处。
如果觉得作者写的还行,可以看一下后续文章哦
https://blog.csdn.net/column/details/27225.html