springBoot项目搭建:

1.打开eclipse,File-New-Maven Project,根据界面完成操作

springBoot项目搭建、运行及上传到github上

springBoot项目搭建、运行及上传到github上

springBoot项目搭建、运行及上传到github上

2.创建包及基础类(controller/service/dao),注意的是,springBoot中有个主程序用于启动项目,该类的位置应为最底层、

项目搭建参考链接:http://www.cnblogs.com/java-zhao/p/5350021.html

启动遇到的错误:

springBoot项目搭建、运行及上传到github上

于是网上搜索了方法(链接:http://blog.csdn.net/fy_sun123/article/details/52169639)

在pom.xml文件中添加:

springBoot项目搭建、运行及上传到github上springBoot项目搭建、运行及上传到github上

于是乎,项目成功启动

网上也搜了其他的办法,第一次处理的时候,pom.xml中添加了依赖(spring-boot-starter-tomcat)上图注释的地方,但是依然不奏效,也不晓得什么原因,也许springBoot中有内置的tomcat,所以这种解决方式不奏效

项目运行成功,接下来就是学习eclipse的项目如何上传到gitHub上

第一步:右击项目名称--Team-Share project

springBoot项目搭建、运行及上传到github上

第二步:创建本地仓库

springBoot项目搭建、运行及上传到github上

提交到本地仓库:

右击项目-----Team---add to index --- commit

提交到远程仓库:

右击项目---Team--remote---push

弹出界面,url地址填写github仓库的地址

springBoot项目搭建、运行及上传到github上

springBoot项目搭建、运行及上传到github上

springBoot项目搭建、运行及上传到github上

项目地址: https://github.com/huangmengxi/ownerPro.git

第一篇博客好开森,妹纸加油



相关文章:

  • 2021-06-20
  • 2021-12-08
  • 2021-07-23
猜你喜欢
  • 2021-09-25
  • 2021-05-25
  • 2021-05-15
  • 2021-09-15
  • 2021-06-24
  • 2021-05-19
相关资源
相似解决方案