IntelliJ IDEA搭建SpringBoot
2017-05-08 00:00
176 查看
摘要: SpringBoot入门
今天看网上的教程一步步的搭建,可是还是出现一堆的问题。为了让大家以后少走一些弯路,我在这里分享下最简单的搭建方法,也希望对大家能有所帮助。
步骤一:在IDEA中新建一个SpringBoot,具体步骤请看看下面的图示:
选择java对应的版本号即可,type中可以选择与Maven或Gradle进行依赖。
选择项目初始依赖的包,SpringBoot会自动加载,
填写你的项目名称及项目地址,点击Finish
至此为止SpringBoot搭建完成后的目录结构
步骤二:测试SpringBoot是否正常安装
编写HelloWord类
新增SpringBoot内置Tomcat端口号(默认为8080),位置位于resources\application.properties
通过StringBoot内置Tomcat进行启动:
通过浏览器进行访问 locahost:8090或127.0.0.1:8090
到此为止简单的SpringBoot已经搭建成功。
如果显示
Wed May 10 16:06:57 CST 2017
There was an unexpected error (type=Not Found, status=404).
No message available
请检查你是否引入thymeleaf,及你的路径是否正确
正常的路径为:http://localhost:8080/SpringBootMaven/hello
今天看网上的教程一步步的搭建,可是还是出现一堆的问题。为了让大家以后少走一些弯路,我在这里分享下最简单的搭建方法,也希望对大家能有所帮助。
步骤一:在IDEA中新建一个SpringBoot,具体步骤请看看下面的图示:
选择java对应的版本号即可,type中可以选择与Maven或Gradle进行依赖。
选择项目初始依赖的包,SpringBoot会自动加载,
填写你的项目名称及项目地址,点击Finish
至此为止SpringBoot搭建完成后的目录结构
步骤二:测试SpringBoot是否正常安装
编写HelloWord类
新增SpringBoot内置Tomcat端口号(默认为8080),位置位于resources\application.properties
server.port=8090
通过StringBoot内置Tomcat进行启动:
通过浏览器进行访问 locahost:8090或127.0.0.1:8090
到此为止简单的SpringBoot已经搭建成功。
如果显示
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.Wed May 10 16:06:57 CST 2017
There was an unexpected error (type=Not Found, status=404).
No message available
请检查你是否引入thymeleaf,及你的路径是否正确
正常的路径为:http://localhost:8080/SpringBootMaven/hello
相关文章推荐
- IntelliJ IDEA搭建SpringBoot的小Demo
- IntelliJ IDEA搭建SpringBoot
- SpringBoot(一)详解intellij idea搭建SpringBoot
- Spark修炼之道(进阶篇)——Spark入门到精通:第三节 Spark Intellij IDEA开发环境搭建
- SpringBoot(2) 搭建SpringFox环境
- Intellij Idea 2016搭建本地服务器破解
- 从框架到完整项目搭建,实战项目《约个球》(4)-Intellij IDEA 导入library和jar文件
- idea使用gradle搭建SpringBoot
- IntelliJ IDEA搭建Spring环境
- IDEA 搭建SpringBoot
- springboot学习(一) 初识,环境搭建,helloWrold
- Intellij IDEA搭建Spark开发环境并运行
- 在 IntelliJ IDEA 14.1.4 上搭建 JFinal 開發環境 (Gradle 版)
- 使用IntelliJ IDEA搭建grails web工程
- scala + intellij idea 环境搭建及编译、打包
- 用Intellij idea搭建solr调试环境
- 使用IntelliJ IDEA 13搭建Android集成开发环境图文教程
- 使用idea搭建springboot的maven项目
- IntelliJ IDEA 最简单配置搭建Spring MVC Java web Maven项目
- SpringBoot + MyBatis + MySQL + Maven在Intellij IDEA下开发环境的搭建