package com.th.demo.controller.system;

import com.th.demo.service.impl.system.SysMenuToolServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@Controller
@RequestMapping(value = "/SysMenuTool")
public class SysMenuToolController {

	@Autowired
	public SysMenuToolServiceImpl sysMenuToolServiceImpl;
	
	@RequestMapping(value = "/query.do")
	public void query(  HttpServletResponse response) throws IOException {
		
		String result = sysMenuToolServiceImpl.menuQuery();
		response.setCharacterEncoding("utf-8");
		response.setHeader("Content-type", "text/html;charset=utf-8");
		PrintWriter out = response.getWriter();
		out.print(result);
		out.flush();
		out.close();
	}
}
