本系列教程包括:
IOT云平台 simple(0)IOT云平台简介
IOT云平台 simple(1)netty入门
IOT云平台 simple(2)springboot入门
IOT云平台 simple(3)springboot netty实现TCP Server
IOT云平台 simple(4)springboot netty实现简单的mqtt broker
IOT云平台 simple(5)springboot netty实现modbus TCP Master
IOT云平台 simple(6)springboot netty实现IOT云平台基本的架构(mqtt、Rabbitmq)
转载:https://blog.csdn.net/afei8080/article/details/101345712
新建springboot的工程:
编写一个简单的Hello world,启动springboot:
代码如下:
@RestController
public class HelloWordController {
@RequestMapping(value = "/index",method = RequestMethod.GET)
public String index(){
return "Hello Word!";
}
}
执行localhost:8080/index验证如下:
具体参考代码:
https://gitee.com/linghufeixia/springboot-simple
chapter1