首先要在数据库中有一个Ttype表:
然后使用 IDEA或者myeclipse 等别的java开发软件去搭建一个WEB项目;
先去把Ttype的实体类和DAO层和Service层搭建完毕;(也就是三层架构啦)
+++++++++++++++++++++++++++++++++
Controller层的源码:
package com.xiexin.controller;
import com.xiexin.bean.TType;
import com.xiexin.service.TTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.io.IOException;
import java.util.H