title: Can't stat app. after updating SpringBoot from 2.0.6.RELEASE to 2.1.0.RELEASE
body: <p>I have a basic SpringBoot 2.0.6.RELEASE app. Using Spring Initializer, JPA, embedded Tomcat, Thymeleaf template engine, and package as an executable JAR with a restful architecture
  I updated the SpringBoot app. from 2.0.6.RELEASE to 2.1.0.RELEASE,</p>
  
  <p>I have this config class:</p>
  
  <pre><code>public class DevApplicationConfig {
  
       @Autowired
       private ErrorAttributes errorAttributes;
  
       @Bean
       public AppErrorController appErrorController(){
           return new AppErrorController(errorAttributes);
       }
  
  }
  </code></pre>
  
  <p>But after the change I got this error in Eclipse when I start the app:</p>
  
  <pre><code>***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  The bean 'appErrorController', defined in class path resource [io/tdk/config/DevApplicationConfig.class], could not be registered. A bean with that name has already been defined in file [/Users/nunet/Documents/workspace-sts-3.9.2.RELEASE/tdk/target/classes/io/tdk/web/controllers/AppErrorController.class] and overriding is disabled. 
  
  @Controller
  public class AppErrorController  implements ErrorController {
  
      private static final Logger LOG = LoggerFactory.getLogger(AppErrorController.class);
      /**
       * Error Attributes in the Application
       */
      private ErrorAttributes errorAttributes;
  
      private final static String ERROR_PATH = "/error";
  
      @Autowired
      private EmailService emailService;
  
      @Value("${systemadmin.email}")
      private String systemAdminEmail;
  
      @Value("${webmaster.email}")
      private String webMasterEmail;
  
      /**
       * Controller for the Error Controller
       * @param errorAttributes
       */
      public AppErrorController(ErrorAttributes errorAttributes) {
          this.errorAttributes = errorAttributes;
      }
  
      /**
       * Supports the HTML Error View
       * @param request
       * @return
       */
      @RequestMapping(value = ERROR_PATH, produces = "text/html")
      public ModelAndView errorHtml(HttpServletRequest request, WebRequest webRequest) {
  
               SimpleMailMessage mailMessage = new SimpleMailMessage();
           mailMessage.setTo(systemAdminEmail);
           mailMessage.setSubject("System Error !");
           mailMessage.setText(getErrorAttributes(request, webRequest, true).toString());
           mailMessage.setFrom(webMasterEmail);
  
           emailService.sendGenericEmailMessage(mailMessage);
  
  
  
          return new ModelAndView(serverContextPath  +"/errors/error", getErrorAttributes(request, webRequest, true));
      }
  
      /**
       * Supports other formats like JSON, XML
       * @param request
       * @return
       */
      @RequestMapping(value = ERROR_PATH)
      @ResponseBody
      public ResponseEntity&lt;Map&lt;String, Object&gt;&gt; error(WebRequest webRequest, HttpServletRequest request) {
          Map&lt;String, Object&gt; body = getErrorAttributes( request, webRequest, true);
          HttpStatus status = getStatus(request);
          return new ResponseEntity&lt;Map&lt;String, Object&gt;&gt;(body, status);
      }
  
  
      /**
       * Returns the path of the error page.
       *
       * @return the error path
       * 
       */
      @Override
      public String getErrorPath() {
          return ERROR_PATH;
      }
  
  
  
      private Map&lt;String, Object&gt; getErrorAttributes(HttpServletRequest request, WebRequest webRequest,
              boolean includeStackTrace) {
  
              return this.errorAttributes.getErrorAttributes(webRequest, includeStackTrace);
  
      }
  
      private HttpStatus getStatus(HttpServletRequest request) {
          Integer statusCode = (Integer) request.getAttribute("javax.servlet.error.status_code");
          if (statusCode != null) {
              try {
                  return HttpStatus.valueOf(statusCode);
              } catch (Exception ex) {
              }
          }
          return HttpStatus.INTERNAL_SERVER_ERROR;
      }
  
  }
  </code></pre>