|  |  | @ -4,7 +4,6 @@ import java.sql.SQLException; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.HashMap; |  |  |  | import java.util.HashMap; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.Map; |  |  |  | import java.util.Map; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.springframework.dao.DuplicateKeyException; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.springframework.web.bind.annotation.ControllerAdvice; |  |  |  | import org.springframework.web.bind.annotation.ControllerAdvice; | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.springframework.web.bind.annotation.ExceptionHandler; |  |  |  | import org.springframework.web.bind.annotation.ExceptionHandler; | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.springframework.web.bind.annotation.ResponseBody; |  |  |  | import org.springframework.web.bind.annotation.ResponseBody; | 
			
		
	
	
		
		
			
				
					|  |  | @ -28,11 +27,11 @@ public class ControllerExceptionHandler { | 
			
		
	
		
		
			
				
					
					|  |  |  | 		return new AjaxResponse(false, e.getMessage()); |  |  |  | 		return new AjaxResponse(false, e.getMessage()); | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	@ResponseBody |  |  |  | //	@ResponseBody
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 	@ExceptionHandler(DuplicateKeyException.class) |  |  |  | //	@ExceptionHandler(DuplicateKeyException.class)
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 	public AjaxResponse handlerDuplicateKeyException(DuplicateKeyException e) { |  |  |  | //	public AjaxResponse handlerDuplicateKeyException(DuplicateKeyException e) {
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		return new AjaxResponse(false, "数据已存在,请勿重复添加"); |  |  |  | //		return new AjaxResponse(false, "数据已存在,请勿重复添加");
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | //	}
 | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	@ResponseBody |  |  |  | 	@ResponseBody | 
			
		
	
		
		
			
				
					
					|  |  |  | 	@ExceptionHandler(SQLException.class) |  |  |  | 	@ExceptionHandler(SQLException.class) | 
			
		
	
	
		
		
			
				
					|  |  | 
 |