// Path: src/main/java/com/bupt/core/security/dao/CourseMapper.java
// public interface CourseMapper {
// 	List<Course> getCourseList();
// }
// 
// Path: src/main/java/com/bupt/core/security/model/Course.java
// public class Course {
// 	private String id;
// 	private String name;
// 	private String num;
// 	private String p_id;
// 	private String type;
// 	public String getId() {
// 		return id;
// 	}
// 	public void setId(String id) {
// 		this.id = id;
// 	}
// 	public String getName() {
// 		return name;
// 	}
// 	public void setName(String name) {
// 		this.name = name;
// 	}
// 	public String getNum() {
// 		return num;
// 	}
// 	public void setNum(String num) {
// 		this.num = num;
// 	}
// 	public String getP_id() {
// 		return p_id;
// 	}
// 	public void setP_id(String p_id) {
// 		this.p_id = p_id;
// 	}
// 	public String getType() {
// 		return type;
// 	}
// 	public void setType(String type) {
// 		this.type = type;
// 	}
// 
// }
// 
// Path: src/main/java/com/bupt/core/security/service/AuthService.java
// public interface AuthService {
// 	boolean validate(String username,String password);
// }


import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.bupt.core.security.dao.CourseMapper;
import com.bupt.core.security.model.Course;
import com.bupt.core.security.service.AuthService;
			throws Exception {
		String username = request.getParameter("username");
		String password = request.getParameter("password");
		System.out.println(username+password);
		boolean flag= authService.validate(username, password);
		if(debug){
			log.debug("$$$$$$$$$$$$$$$$$$$$$you want to check the result.jsp+++++++++++++");
			log.debug("$$$$$$$$$$$$$$$$$$$$$ ready to insert   +++++++++++++");
			log.debug("$$$$$$$$$$$$$$$$$$$$$ insert completed +++++++++++++");
			log.debug(flag);
		}
		return "result";
	}
	
	//获取当前用户的信息
	//UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
	
	//返回json对象示例
	@RequestMapping("/courseWare_courseTreeList.do")
	@ResponseBody
	public List<Course> getCourseTreeList()
			throws Exception {
		List<Course> list_show = courseMapper.getCourseList();
		return list_show;
	}

	public AuthService getAuthService() {
		return authService;
	}

// Path: src/main/java/com/bupt/core/security/dao/CourseMapper.java
// public interface CourseMapper {
// 	List<Course> getCourseList();
// }
// 
// Path: src/main/java/com/bupt/core/security/model/Course.java
// public class Course {
// 	private String id;
// 	private String name;
// 	private String num;
// 	private String p_id;
// 	private String type;
// 	public String getId() {
// 		return id;
// 	}
// 	public void setId(String id) {
// 		this.id = id;
// 	}
// 	public String getName() {
// 		return name;
// 	}
// 	public void setName(String name) {
// 		this.name = name;
// 	}
// 	public String getNum() {
// 		return num;
// 	}
// 	public void setNum(String num) {
// 		this.num = num;
// 	}
// 	public String getP_id() {
// 		return p_id;
// 	}
// 	public void setP_id(String p_id) {
// 		this.p_id = p_id;
// 	}
// 	public String getType() {
// 		return type;
// 	}
// 	public void setType(String type) {
// 		this.type = type;
// 	}
// 
// }
// 
// Path: src/main/java/com/bupt/core/security/service/AuthService.java
// public interface AuthService {
// 	boolean validate(String username,String password);
// }


// Path: src/main/java/com/bupt/core/security/action/AuthAction.java
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.bupt.core.security.dao.CourseMapper;
import com.bupt.core.security.model.Course;
import com.bupt.core.security.service.AuthService;

			throws Exception {
		String username = request.getParameter("username");
		String password = request.getParameter("password");
		System.out.println(username+password);
		boolean flag= authService.validate(username, password);
		if(debug){
			log.debug("$$$$$$$$$$$$$$$$$$$$$you want to check the result.jsp+++++++++++++");
			log.debug("$$$$$$$$$$$$$$$$$$$$$ ready to insert   +++++++++++++");
			log.debug("$$$$$$$$$$$$$$$$$$$$$ insert completed +++++++++++++");
			log.debug(flag);
		}
		return "result";
	}
	
	//获取当前用户的信息
	//UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
	
	//返回json对象示例
	@RequestMapping("/courseWare_courseTreeList.do")
	@ResponseBody
	public List<Course> getCourseTreeList()
			throws Exception {
		List<Course> list_show = courseMapper.getCourseList();
		return list_show;
	}

	public AuthService getAuthService() {
		return authService;
	}

	public void setAuthService(AuthService authService) {