package com.hzz.project.controller; import com.hzz.project.po.blog.Blog; import com.hzz.project.service.BlogService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; /** * Created by hong on 2017/1/13. */ @Controller public class HomeController { @Autowired private BlogService blogService; @RequestMapping("/home") public String home(Model model) { List<Blog> blogs = blogService.getAllBlog(); model.addAttribute("blogs", blogs); return "home"; } @ResponseBody @RequestMapping("/getblog") public List<Blog> getblog(Blog blog) { List<Blog> blogs = blogService.getAllBlog(); return blogs; } }

monolog LV4
2023年6月18日
liangge2115 LV27
2022年11月7日
xyl11961196 LV18
2022年5月28日
wanglinddad LV55
2022年4月17日
qq3577025766 LV6
2022年3月18日
找找找找找 LV4
2022年3月17日
wjh12345654321 LV14
2022年1月20日
wangqiang1233211 LV2
2021年10月15日
lsglsg9 LV23
2021年9月8日
eclipse_javen LV6
2021年8月21日

799743530 LV11
2024年7月11日
微信网友_7051335135711232
2024年6月24日
暂无贡献等级
lun123456
2024年6月23日
暂无贡献等级
xzg123456 LV6
2024年6月19日
领通过后哄哄你 LV1
2024年6月8日
goccgoccgocc LV4
2024年5月23日
abcdmly12 LV1
2024年1月12日
minjing123 LV8
2024年1月4日
周敏国 LV9
2023年8月21日
19137715150 LV1
2023年6月18日