Spring Boot - время ожидания шлюза 504 - PullRequest
0 голосов
/ 29 июня 2018

Я только что создал простой стартовый проект Spring, который содержит один контроллер и только один Rest API, который печатает журналы на консоли. Я не вижу никаких исключений / ошибок при запуске весеннего загрузочного сервера, все выглядит хорошо. но я получаю 504 ошибку тайм-аута шлюза при доступе к остальному API через Postman или Curl вот мой класс контроллера.

Класс контроллера

import org.slf4j.Logger;

import org.slf4j.LoggerFactory;

import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

@RestController 

@RequestMapping(path = "/test")

public class SampleController {

    private static final Logger LOG = 
     LoggerFactory.getLogger(SampleController.class.getSimpleName());

    @GetMapping(value = "/method")
    public void saveEcu() {

        LOG.info("---> reached test/method----> ");

    }

}

Журнал консоли

2018-06-28 22:03:52.890  INFO 7040 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-06-28 22:03:52.898 DEBUG 7040 --- [           main] o.s.w.c.s.StandardServletEnvironment     : Adding PropertySource 'Management Server' with lowest search precedence
2018-06-28 22:03:52.901  INFO 7040 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0
2018-06-28 22:03:53.014 DEBUG 7040 --- [           main] o.s.w.s.resource.ResourceUrlProvider     : Looking for resource handler mappings
2018-06-28 22:03:53.014 DEBUG 7040 --- [           main] o.s.w.s.resource.ResourceUrlProvider     : Found resource handler mapping: URL pattern="/**/favicon.ico", locations=[ServletContext resource [/], class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/], class path resource []], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@3c744059]
2018-06-28 22:03:53.014 DEBUG 7040 --- [           main] o.s.w.s.resource.ResourceUrlProvider     : Found resource handler mapping: URL pattern="/webjars/**", locations=[class path resource [META-INF/resources/webjars/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@ab2dd851]
2018-06-28 22:03:53.015 DEBUG 7040 --- [           main] o.s.w.s.resource.ResourceUrlProvider     : Found resource handler mapping: URL pattern="/**", locations=[ServletContext resource [/], class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@c804fffb]
2018-06-28 22:03:53.042  INFO 7040 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 9091 (http)
2018-06-28 22:03:53.043 DEBUG 7040 --- [           main] o.s.w.c.s.StandardServletEnvironment     : Adding PropertySource 'server.ports' with highest search precedence
2018-06-28 22:03:53.047  INFO 7040 --- [           main] c.e.demo.NewStarterProjectApplication    : Started NewStarterProjectApplication in 3.822 seconds (JVM running for 5.088)
...