Class GlobalControllerAdvice

java.lang.Object
de.digitalcollections.cudami.admin.controller.advice.GlobalControllerAdvice

@ControllerAdvice public class GlobalControllerAdvice extends Object
Adds the webapp version read from application.yml as global model attribute and initializes custom property editors.
  • Constructor Details

    • GlobalControllerAdvice

      public GlobalControllerAdvice(RoleEditor roleEditor, @Value("${info.app.project.version}") String version)
  • Method Details

    • handleResourceNotFoundException

      @ExceptionHandler(de.digitalcollections.model.exception.ResourceNotFoundException.class) @ResponseStatus(NOT_FOUND) public String handleResourceNotFoundException(org.springframework.ui.Model model)
    • registerCustomEditors

      @InitBinder public void registerCustomEditors(org.springframework.web.bind.WebDataBinder binder, org.springframework.web.context.request.WebRequest request)
    • getVersion

      @ModelAttribute("version") public String getVersion()