It is convenient to start the writing of Hello_SpringBoot
Just follow the previous tutorial to configure it, although I haven't written it yet, haha
0x01 Create a new Hello
package com.Sky.o2o;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class Hello {
@RequestMapping(name = "/hello", method = RequestMethod.GET)
public String hello() {
return "hello, you fucking guys springBoot";
}
}
0x02 Comment
Comment the code in the red box below in pom.xml, because it will start using Java Application later
0x03 Configure application.properties
This file is the configuration file of the Springboot project, which configures the port number and prefix for the project under this file to run:
server.port=8080
#加入/o2o前缀
server.context-path=/o2o