Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 27 20:46

    bclozel on main

    Polish See gh-32484 (compare)

  • Sep 27 20:41
    bclozel commented #32484
  • Sep 27 20:30
    bclozel closed #32484
  • Sep 27 20:30

    bclozel on main

    Auto-configure Observation supp… (compare)

  • Sep 27 19:55
    xenoterracide commented #13113
  • Sep 27 19:54
    xenoterracide commented #13113
  • Sep 27 17:22
    wilkinsona labeled #32525
  • Sep 27 17:22
    wilkinsona unlabeled #32525
  • Sep 27 17:22
    wilkinsona closed #32525
  • Sep 27 17:22
    wilkinsona commented #32525
  • Sep 27 17:20
    spring-projects-issues labeled #32525
  • Sep 27 17:19
    pivotal-cla commented #32525
  • Sep 27 17:18
    pivotal-cla commented #32525
  • Sep 27 17:18
    devrishal opened #32525
  • Sep 27 17:01
    chadlwilson commented #32386
  • Sep 27 17:00
    chadlwilson commented #32386
  • Sep 27 16:59
    chadlwilson commented #32386
  • Sep 27 16:33
    wilkinsona labeled #32024
  • Sep 27 16:31
    wilkinsona labeled #32415
  • Sep 27 16:31
    wilkinsona milestoned #32415
Asgar Javadov
@asgarj
My BPP is exposing prometheus metrics on /metrics endpoint. Bydefault, it's /actuator/prometheus
@wilkinsona Is the problem clear now?
koyaja
@koyaja
@mickeelm ok
Asgar Javadov
@asgarj
@wilkinsona here's the discussion in github about how it's evolved spring-projects/spring-boot#16169 @bclozel @snicoll
koyaja
@koyaja
Good morning all,
I built an API which sends sms or three instances is deployed, at the beginning it was running on tomcat for a moment we start by receiving the error Too many open files I tried several solutions until migrating spring boot 2.2.2 then jetty but after a while I still receive org.eclipse.jetty.server.HttpChannel - handleException /api/sender java.io.IOException: Too many open filesWhat can be the problem ? Thank you
James Howe
@OrangeDog
You have too many open files/sockets.
Probably because you're leaking them somewhere, but perhaps you've just tuned your deployment wrong for your traffic.
(or not tuned it)
koyaja
@koyaja
How to manage traffic with spring boot ?
Andy Wilkinson
@wilkinsona
@asgarj Yes, it's clear now thank you. I'd avoid altering WebEndpointProperties in a bean post-processor if you can. I think an EnvironmentPostProcessor registered via spring.factories that adds a PropertySource with the appropriate settings would be a better approach.
Asgar Javadov
@asgarj
@wilkinsona beautiful!! Is that EnvironmentPostProcessor gets evaluated before those @Conditional...s are evaluated? 2. If I add it there, then if clients want to say exclude it in their application.yml, then what's the behaviour? what takes the precedence? My guess is that it can be handled in the EnvironmentPostProcessor :)
udayKumar Bommala
@udaykumar1995
Any one did a POC on Distributed tracing using spring cloud slueth and zipkin with latest springboot version?
unfortunately I could not find it in spring.io guides too
Can some guide me with a reference how to implement distributed tracing with spring slueth & zipkin with latest springboot version?
Amar
@amar.t_gitlab
Hi,
Andy Wilkinson
@wilkinsona
@asgarj You can decide what has precedence by the position of the property source within the environment. The first source with a particular property wins.
praveenambati1233
@praveenambati1233
S
Gg
Asgar Javadov
@asgarj
@wilkinsona There's one nuance with management.endpoints.web.exposure.include is that it takes a comma-separated list. So in this case, if you add a new property source for each endpoint (in my case they are in different modules and each has its own EnvPostProcessor), then the one which is first in the order, is the one that's exposed, and the rest is not exposed. In this case, is it fair to solution to scan through environment.propertySources and find the first instance where management.endpoints.web.exposure.include is defined and alter (append new endpoint) it there? Or is there a better way?
Dave Jensen
@djensen47
Is there a Slack or is this the main chat for Spring Boot?
Mikael Elm
@mickeelm
I believe this is the official place
Shyam Sreenivasan
@vegeta03
Hi All,
Can anyone please tell steps on how to deploy SpringWebflux with ReactorNetty in production.
Stéphane Nicoll
@snicoll
@djensen47 this is the community channel for Spring Boot related questions. We don’t have slack.
Mikael Elm
@mickeelm
@vegeta03 your question is so broad, that it is impossible for anyone here to understand exactly what you want us to help you with. Have you built an application that you want to deploy, if so, with what kind of setup/infrastructure? Or, do you want to learn how to build an application with the named technologies?
Andy Wilkinson
@wilkinsona
@asgarj Given the complexity of your arrangement, it's starting to sound like you would be better off implementing your own condition.
Asgar Javadov
@asgarj
@wilkinsona The Endpoints that I'm adding are fine. I may choose not to put any condition on them. However, the problem is with PrometheusMetrics that has been changed to @ConditionalOnAvailableEndpoint which forces me to expose it in runtime at the beginning.
Andy Wilkinson
@wilkinsona
@asgarj I don't think I understand your problem then. Earlier you talked about a property source per endpoint, but now you're saying the problem is a single endpoint.
Tomas Hanus
@hanusto
@ravikancherla_gitlab / @wilkinsona I found the same issue (2.2.4) related to registration custom data types for Hibernate. I think that probably there is library now only with provided of jaxb module. But which ...
Vyacheslav N. Boyko
@bvn13
hi all. I need a help.
My issue is about springboot test does not import MessageSourceAutoConfiguration.
@ImportAutoConfiguration(classes = {
        MessageSourceAutoConfiguration.class
})
public class I18nConfig {
/* some beans */
}

@RunWith(SpringRunner.class)
@ContextConfiguration(classes = I18nTest.TestConfig.class)
@ActiveProfiles("test")
public class I18nTest {

/* tests are here */

    @TestConfiguration
    @Import({
            I18nConfig.class
    })
    public static class TestConfig {

    }
}
and my test says me that MessageSource is instance of DelegatingMessageSource, messageSource=Empty MessageSource - but MessageSourceAutoConfiguration instantiates ResourceBundleMessageSource bean
why MessageSourceAutoConfiguration does not work this way?
molexx
@molexx

I want to run the same junit5 tests class 3 times, each time with a context property set to a different value. Is there a nice way to do that?

@ParameterizedTest is only method not class level, and whilst I could use @DirtiesContext(AFTER_EACH_TEST_METHOD)to recreate the context that is quite expensive to do per test and I can't see how to set the context property before the context is initialized.

Shyam Sreenivasan
@vegeta03
@mickeelm I have created an application with Spring Webflux MongoDB, I want to know that, do we deploy using tomcat like normal Spring MVC apps or is there a difference because of the NIO aspect of Webflux.
Thanks.
Mikael Elm
@mickeelm
Ah, sorry, lose the question mark on the end. Can't edit the post now
Ahmed Rebai
@Rebaiahmed
Builder Pattern is one of the Design Pattern in Java, It reduces the number of parameters required for a constructor or method invocation via custom types and parameter objects.
Anthony Lofton
@miller79
Question for the community but we are running into very slow spring boot startup times when deploying a spring boot docker image through kubernetes (up to 120 seconds). I have looked at the Spring Boot Benchmark that Dave Syer has provided (https://github.com/dsyer/spring-boot-startup-bench) but in my environment, the CPU settings used are still significantly faster than what have/use. Does anyone have any documentation/best practices or anything on improving Spring Boot startup times? We are also starting to evaluate GraalVM to see if we can get some performance improvements as well but wanting to get some feedback from the Spring Boot team if possible.
Brian Clozel
@bclozel
@miller79 GraalVM is super nice, but it's really a different problem space. Profiling what's happening for your app at startup time might uncover the issue. Do you have logs, profiling data that we could take a look at?
Anthony Lofton
@miller79
@bclozel I can grab some of our tests, but specifically the issue is based on the CPU allocated to the startup of the application. There was a specific amount we could allocate that would allow the application to boot in 1-2 seconds. But once we hit that threshold, it would increase significantly (up to 120 seconds). The application we were testing with specifically was a basic Spring Boot application through start.spring.io with just Spring Web. We ran a docker image of it with a setting similar to this: docker run --cpus=".4" spring_min:latest and it showed similar startup times locally. I'll post more information about our tests when I can get the latest copy of it.
Anthony Lofton
@miller79
@bclozel I have checked in a benchmark application to directly show the performance we are seeing here: https://github.com/miller79/spring-boot-benchmark I have ran on my box with .4 CPU and seeing 30 seconds plus start up time. This is as bare of an application I could create but would like some feedback on if there are any other enhancements we can do to increase performance. My current CPU is an i7-7600U @ 2.8GHz with 16 GB of ram.
Anthony Lofton
@miller79
I don't have the benchmark code from these tests we have done here but here is some comparisons someone has done in our Org comparing with other frameworks with relatively small amount of code: https://github.com/miller79/spring-boot-benchmark/blob/master/various-framework-benchmark.md
Rüdiger zu Dohna
@t1
I'm evaluating RFC-7807 Problem Details to return a standardized http body to describe the exact reason for an error code.
I wrote a very basic PoC implementation also for Spring Boot: https://github.com/t1/problem-details
I've already commented on a related issue: spring-projects/spring-boot#19525
What do you all think of this? Is it worth investigating further? Error handling is nothing fancy, but I think it deserves more love :-)
Heaven31415
@Heaven31415
Hello.
gintautassulskus-elsevier
@gintautassulskus-elsevier
hi all, do you know what happened to ConfluentSchemaRegistryClient which is part of spring-cloud Finchley but no longer in Hoxton?
looks like the spring-cloud-stream-schema dependency is gone
Stefano De Angelis
@deanstef
Hi guys! I need help for my spring boot application. I am working on a backend REST API server. This server exposes a number of resources that must be protected with authentication and authorization rules. The API will be consumed by mobile applications who offer Social Login (Facebook, google) and username and password login. How should I handle this problem authenticating users? I have already used JWT authentication which is fine. But now I need to work with different tokens (coming from Facebook and Google) and I have no idea how to manage them. I read something about OAUTH2 but it is very confusing too me. Thank you in advance !
Konstantin Bläsi
@konstantinblaesi
@deanstef maybe get to know oauth2 first https://www.youtube.com/watch?v=996OiexHze0
looks like they also have another video targeted at spring + oauth2 , not sure how good that one is :) https://www.youtube.com/watch?v=TaZqDrwBWwA