1.安装插件

打开Eclipse-Help-Eclipse Marketplace-搜索spring tools,找到对应工具安装

下载完成后,重启eclipse,选择新建project-spring-spring start project,新建Spring boot 项目。

选择web选项

如果pom文件没有web依赖,需要加入:

<dependency>      
  <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId>
</dependency>

建议测试类:

运行DemoApplication类,选择Spring Boot App

输入网址http://127.0.0.1:8080/hi,即可访问,开发非常快速。

修改访问端口和默认路径

  • 在这里我们使用更加好看的application.yml方式配置。只需要将默认的application.properties替换为application.yml即可。
  • 在yml添加以下代码,修改端口为8081,后缀添加路径为/test

server.port=8081
server.servlet.context-path=/test

最新文章

  1. python之GUI编程(二)win10 64位 pygame的安装
  2. Python学习01 Hello World
  3. git 使用钩子直接推送到工作目录
  4. Linux日常使用指令大全
  5. 理解KMP
  6. iOS 进阶 第十一天(0411)
  7. 实现CCLayer只显示一个矩形可见区域
  8. YII中引用自定义类
  9. 用CSS3写的钟表
  10. IE9下报错,错误: “JSON”未定义
  11. Objective-C马路成魔【12-分类和协议】
  12. 第三方推送 JPush 配置中的引入so库问题
  13. git commit -m 提交的内容换行
  14. [springMvc] 源码分析笔记(二)
  15. socket编程(C++)
  16. Codefoces 277 E. Binary Tree on Plane
  17. centos7 tar.xz格式文件的解压方法
  18. docker 报ls: cannot open directory software/: Permission denied
  19. oracle使用(1)
  20. git五分钟教程

热门文章

  1. RFC2616-HTTP1.1-Header Field Definitions(头字段规定部分—单词注释版)
  2. 英语口语练习系列-C23-运动
  3. python3.6.5 + selenium +VS Code 运行报错:Unable to find a matching set of capabilities的解决
  4. [P1020]导弹拦截 (贪心/DP/二分/单调队列)
  5. 使用log
  6. yii2 数据库和ActiveRecord
  7. html页面布局之table布局:
  8. IO流(5)—缓冲流
  9. Aizu2249 Road Construction(dijkstra优化+思路 好题)
  10. HTML5 学习05—— 拖放(Drag 和 Drop)