lib/templates/src/main/java/controller/BaseController.java.erb in spring-gen-0.2.2 vs lib/templates/src/main/java/controller/BaseController.java.erb in spring-gen-0.2.3
- old
+ new
@@ -1,10 +1,9 @@
package <%=@package%>.controller;
<%=@licence%>
-import <%=@package%>.exception.NotCreatedException;
import <%=@package%>.model.BaseEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.rest.webmvc.ResourceNotFoundException;
import org.springframework.hateoas.EntityLinks;
import org.springframework.http.HttpStatus;
@@ -39,15 +38,7 @@
@ExceptionHandler(ResourceNotFoundException.class)
@ResponseStatus(HttpStatus.NOT_FOUND)
public String handleNotFound(ResourceNotFoundException ex) {
return ex.toString();
- }
-
-
-
- @ExceptionHandler(NotCreatedException.class)
- @ResponseStatus(HttpStatus.NOT_ACCEPTABLE)
- public String handleNotCreated(NotCreatedException ex) {
- return "couldn't create resource";
}
}