博客
关于我
Spring boot入门应用
阅读量:178 次
发布时间:2019-02-28

本文共 1272 字,大约阅读时间需要 4 分钟。

一 环境要求
开发环境JDK:1.8
项目管理工具:Maven
开发工具(Eclipse)
二 入门
1 创建Maven项目
2 修改pom文件
4.0.0
cn.itsource
springboot-hello
0.0.1-SNAPSHOT
org.springframework.boot
spring-boot-starter-parent
1.4.1.RELEASE
1.8
org.springframework.boot
spring-boot-starter-web
3 jar包的依赖关系
三 项目错误修改方法
【windows】->【show view】->【other】
四 创建一个controller
HelloController.java
package cn.itsource.springboot.controller;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RestController;@RestControllerpublic class HelloController {     @RequestMapping("/hello")     public String hello(){           return "Hello SpringBoot";     }}
五 创建一个启动类
变化一下包的组织格式
App.java
package cn.itsource.springboot;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;@SpringBootApplicationpublic class App {     public static void main(String[] args){           SpringApplication.run(App.class, args);     }}
六 运行
七 验证
你可能感兴趣的文章
Nginx实现动静分离
查看>>
Nginx实现反向代理负载均衡
查看>>
nginx实现负载均衡
查看>>
Nginx将https重定向为http进行访问的配置(附Demo)
查看>>
nginx工作笔记004---配置https_ssl证书_视频服务器接口等
查看>>
nginx常用命令及简单配置
查看>>
Nginx常用屏蔽规则,让网站更安全
查看>>
nginx开机启动脚本
查看>>
nginx异常:the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf
查看>>
nginx总结及使用Docker创建nginx教程
查看>>
nginx报错:the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:128
查看>>
nginx报错:the “ssl“ parameter requires ngx_http_ssl_module in usrlocalnginxconfnginx.conf128
查看>>
nginx日志分割并定期删除
查看>>
Nginx日志分析系统---ElasticStack(ELK)工作笔记001
查看>>
Nginx映射本地json文件,配置解决浏览器跨域问题,提供前端get请求模拟数据
查看>>
Nginx映射本地静态资源时,浏览器提示跨域问题解决
查看>>
nginx最最最详细教程来了
查看>>
Nginx服务器---正向代理
查看>>
Nginx服务器上安装SSL证书
查看>>
Nginx服务器基本配置
查看>>