本文介绍了jHipster Undertow请求失败HttpServerExchange的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将jHipster用于后端管理仪表板应用程序,并且我经常收到此错误,每次服务器出现故障都将其关闭.

i'm using jHipster for back-end admin dashboard application and i'm getting this error often that brings my server down every time it appears.

由于jHipster生成了大量配置,所以我唯一能找到的关于undertow的就是这种方法:

Since jHipster generates a lot of configuration, the only thing i could find about undertow is this method :

@Override
public void customize(ConfigurableEmbeddedServletContainer container) {
    MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT);
    // IE issue, see https://github.com/jhipster/generator-jhipster/pull/711
    mappings.add("html", MediaType.TEXT_HTML_VALUE + ";charset=utf-8");
    // CloudFoundry issue, see https://github.com/cloudfoundry/gorouter/issues/64
    mappings.add("json", MediaType.TEXT_HTML_VALUE + ";charset=utf-8");
    container.setMimeMappings(mappings);
    // When running in an IDE or with ./mvnw spring-boot:run, set location of the static web assets.
    setLocationForStaticAssets(container);

    /*
     * Enable HTTP/2 for Undertow - https://twitter.com/ankinson/status/829256167700492288
     * HTTP/2 requires HTTPS, so HTTP requests will fallback to HTTP/1.1.
     * See the JHipsterProperties class and your application-*.yml configuration files
     * for more information.
     */
    if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) &&
        container instanceof UndertowEmbeddedServletContainerFactory) {

        ((UndertowEmbeddedServletContainerFactory) container)
            .addBuilderCustomizers(builder ->
                builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true));
    }
}

谁能告诉我问题出在哪里?

Can anyone tell me where is the problem?

提前谢谢!

推荐答案

是搜索爬网程序,找不到URL,抛出错误,您可以编写robots.txt禁止在根目录上使用它.

It's the search crawler to get url not found,throw the error,you can write robots.txt to prohibit it on the root directory.

这篇关于jHipster Undertow请求失败HttpServerExchange的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 07:07