首页>代码>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();
	}
}
最近下载更多
微信网友_7134912998903808  LV15 2024年8月29日
jskdbf  LV7 2022年6月11日
lilong007  LV23 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日
最近浏览更多
talete  LV3 2月14日
ma406805131  LV19 2024年12月18日
微信网友_7134912998903808  LV15 2024年8月29日
try8023  LV19 2024年6月7日
1134116035 2024年2月28日
暂无贡献等级
heshao  LV2 2024年2月7日
PSSDZH  LV3 2023年12月26日
zhaozhiqi  LV5 2023年10月10日
yeyuuu  LV6 2023年5月18日
箜canasd  LV5 2023年4月3日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友