"Spring Boot REST Client Logging Made Easy

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии •

  • @Nick-yd3rc
    @Nick-yd3rc Месяц назад +2

    I appreciate your video as always. I’ve been doing Spring for many years. Having stepped away from it for a couple weeks now, I must say, it never stops to surprise me just how much error-prone hassle it imposes on you for something so simple, it doesn’t make me feel like one can be agile or simply productive with Spring 😅 and I tend to forget about that when I get back to the Spring ecosystem, debugging production code. You never stop learning with Spring.😅

  • @zerocodercool
    @zerocodercool Месяц назад

    Nice! Thanks for sharing, Dan!

  • @LordBrad2
    @LordBrad2 Месяц назад

    Great stuff!

  • @geni4551
    @geni4551 Месяц назад +7

    What about a websocket example with Spring?

  • @mohammedsaeed3639
    @mohammedsaeed3639 Месяц назад

    Really helpful , thanks Dan

  • @Ligtez
    @Ligtez Месяц назад +4

    It shouldn't be so complicated to do something so commonly needed!!!
    Fortunately, instead of RestClient I am using Apache Camel in my project. Logging (and almost everything) is incredibly much simpler.

  • @JimShingler
    @JimShingler Месяц назад

    Very Nice!

  • @napty5841
    @napty5841 Месяц назад

    Dan answering questions from Dan
    Nice

  • @kappaj01
    @kappaj01 Месяц назад

    Seems like a pretty heavy approach just to get a log! Lots of buffers and reading stuff. Error prone.
    Great video!

  • @joseangulo8168
    @joseangulo8168 Месяц назад

    Thank you, do you know which use cases can be acomplished with this example, please 😅

  • @mrMarseleene
    @mrMarseleene Месяц назад

    wtf, Dan, i literally was thinking about loggig, like i need change my print to log in my pet project and here we go

  • @FredrikRambris
    @FredrikRambris Месяц назад

    I have done something very similar. Could you also do a bit on server request logging. From basic common log format to detailed body logging. Both with tomcat and jetty

  • @SaifuddinMerchant
    @SaifuddinMerchant Месяц назад

    I always wondered why the framework doesn't provide an implementation of the interceptor (logging interceptor) that one could just use out of the box?

  • @mavt1943
    @mavt1943 Месяц назад +1

    For spring webflux(webclient)?

  • @AhmedAli-qx4og
    @AhmedAli-qx4og Месяц назад +2

    Hi Dan,
    how about configuring the RestClient requestFactory with the below
    .requestFactory(new BufferingClientHttpRequestFactory(new SimpleClientHttpRequestFactory()))
    full bean definition is below
    @Bean
    RestClient demoServiceRestClientConfigurer(
    RestClient.Builder restClientBuilder,
    AppProperties.ExternalSystem demoSystemProperties,
    RestClientInterceptor demoRestClientInterceptor) {
    return restClientBuilder
    .baseUrl(demoSystemProperties.getBaseUrl())
    .requestFactory(new BufferingClientHttpRequestFactory(new SimpleClientHttpRequestFactory()))
    .requestInterceptor(demoRestClientInterceptor)
    .build();
    }