首页>代码>SSM仿制Tenda路由器公司官方网站>/Tenda/src/controller/ProductTypeController.java
package controller;

import java.io.PrintWriter;
import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import pojo.ProductType;
import service.ProductTypeService;
import tools.JSONTools;

@Controller
public class ProductTypeController {

	@Resource
	public ProductTypeService productTypeService;
	
	//返回所有的商品数据类型
	@RequestMapping("/getAllProductType.html")
	public void getAllProductType(HttpServletResponse response) throws Exception {
		response.setCharacterEncoding("utf-8");
		List<ProductType> list = productTypeService.getAllProductType();
		String jsonList = JSONTools.JSONList(list);
		PrintWriter out = response.getWriter();
		out.write(jsonList);
		out.flush();
		out.close();
	}
}
最近下载更多
jskdbf  LV7 2022年6月11日
lilong007  LV20 2021年12月22日
success1011  LV8 2021年12月15日
双方各何必呢  LV13 2021年12月10日
桐姥爷无敌呀  LV4 2021年11月15日
dxadsaf  LV6 2021年10月7日
15167672991  LV6 2021年6月29日
凉筱123  LV2 2021年5月29日
xiaoxiexie  LV13 2021年4月26日
wangtao1111111111  LV15 2021年2月3日
最近浏览更多
1134116035 2月28日
暂无贡献等级
heshao  LV2 2月7日
PSSDZH  LV3 2023年12月26日
zhaozhiqi  LV5 2023年10月10日
yeyuuu  LV6 2023年5月18日
箜canasd  LV5 2023年4月3日
微信网友_6248713511227392  LV11 2022年12月5日
邬松桥  LV11 2022年11月16日
abcdljw  LV20 2022年11月16日
1792461859  LV2 2022年11月15日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友