之前一篇的文章已经将SpringBoot配置好了
这里继续实现功能
首先先创建java里的controller层,dao层,pojo层,service层
resources里的mapper 和存储html的templates(自取名)
controllerceng
package com.zr.gmspringboot.controller;
import com.zr.gmspringboot.pojo.UserInfo;
import com.zr.gmspringboot.service.IUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("/user")
public class UserInfoController {
@Autowired
private IUserInfoService userInfoService;
@RequestMapping("hello")
@ResponseBody
public String hello(){
return "Hello World!";
}
@RequestMapping("page")
public String page(){
return "delUser"