ホワイトラベルエラーページを削除しようとしているので、「/ error」のコントローラーマッピングを作成しました。
@RestController
public class IndexController {
    @RequestMapping(value = "/error")
    public String error() {
        return "Error handling";
    }
}
しかし、今はこのエラーが発生しています。
Exception in thread "AWT-EventQueue-0" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource   [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Invocation  of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'basicErrorController' bean method 
public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>>  org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletR equest)
to {[/error],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}: There is already 'indexController' bean method
私が何か悪いことをしているかどうかわからない。アドバイスをお願いします。
編集:
すでにerror.whitelabel.enabled=false  application.propertiesファイルに追加され
     ていますが、同じエラーが発生します
spring.resources.add-mappings=falseか?
                /errorパスが呼び出されたときに、カスタムコンテンツを返そうとしているだけですか?