长春网站建设公司排名,珠海工程建设信息网站,wordpress如何汉化主题,网站首页的优化目录
新建Maven工程#xff0c;什么都不选
pom.xml加上
新建包top.cjz.controller 新建类HelloController
新建类HelloApplication
运行浏览器访问 新建Maven工程#xff0c;什么都不选 pom.xml加上 !--springboot工程需要继承的父工程-- parent…目录
新建Maven工程什么都不选
pom.xml加上
新建包top.cjz.controller 新建类HelloController
新建类HelloApplication
运行浏览器访问 新建Maven工程什么都不选 pom.xml加上 !--springboot工程需要继承的父工程-- parent groupIdorg.springframework.boot/groupId artifactIdspring-boot-starter-parent/artifactId version2.1.8.RELEASE/version /parent dependencies !--web开发的起步依赖-- dependency groupIdorg.springframework.boot/groupId artifactIdspring-boot-starter-web/artifactId /dependency /dependencies 新建包top.cjz.controller 新建类HelloController package top.cjz.controller;import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;RestController
public class HelloController {RequestMapping(/hello)public String hello(){return Hello SpringBoot;}
}新建类HelloApplication package top.cjz;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;SpringBootApplication
public class HelloApplication {public static void main(String[] args) {SpringApplication.run(HelloApplication.class,args);}
}运行浏览器访问