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 LV54
2022年4月17日
qq3577025766 LV6
2022年3月18日
找找找找找 LV4
2022年3月17日
wjh12345654321 LV14
2022年1月20日
wangqiang1233211 LV2
2021年10月15日
lsglsg9 LV22
2021年9月8日
eclipse_javen LV6
2021年8月21日
最近浏览更多
abcdmly12 LV1
1月12日
minjing123 LV8
1月4日
周敏国 LV9
2023年8月21日
19137715150 LV1
2023年6月18日
shuidajiao
2023年6月18日
暂无贡献等级
monolog LV4
2023年6月18日
张真狗 LV9
2023年6月10日
微信网友_6260196253601792 LV7
2023年6月7日
3305787467 LV12
2023年6月3日
微信网友_6495054193971200 LV2
2023年5月30日