title: Custom Http Status Code in Spring
body: <p>I am using Spring Boot and I am using Exception Classes thoughout my business logic code. One might look like this:</p>
  
  <pre><code>@ResponseStatus(HttpStatus.BAD_REQUEST)
  public class ExternalDependencyException extends RuntimeException {
  
      public ExternalDependencyException() {
          super("External Dependency Failed");
      }
      public ExternalDependencyException(String message) {
          super(message);
      }
  
  }
  </code></pre>
  
  <p>Well now there are Exception, where no predefined Http Status code is fitting, so I would like to use a status code like 460 or similar, which is still free, but the annotation <code>ResponseStatus</code> just accepts values from the enum <code>HttpStatus</code>. Is there a way to achieve an Exception class with a custom status code in the java spring boot environment?</p>