Class 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 Detail

      • GlobalControllerAdvice

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

      • registerCustomEditors

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

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