Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 17:51
    scottfrederick milestoned #33482
  • 17:51
    scottfrederick unlabeled #33482
  • 17:51
    scottfrederick labeled #33482
  • 17:51
    scottfrederick edited #33482
  • 17:41
    spring-projects-issues labeled #33487
  • 17:38
    bademux opened #33487
  • 17:02
    bclozel closed #33486
  • 17:02

    bclozel on main

    Upgrade to Thymeleaf 3.1.1.RELE… (compare)

  • 17:00
    bclozel labeled #33486
  • 17:00
    bclozel opened #33486
  • 17:00
    bclozel assigned #33486
  • 17:00
    bclozel milestoned #33486
  • 13:56
    spring-projects-issues labeled #33485
  • 13:53
    HenningWaack opened #33485
  • 13:49

    bclozel on main

    Start building against Spring G… Start building against Reactor … Start building against Spring F… and 3 more (compare)

  • 12:20
    bclozel closed #33483
  • 12:20

    bclozel on main

    Fix IllegalArgumentException in… (compare)

  • 12:20
    bclozel commented #33483
  • 11:26
    spring-projects-issues unlabeled #33484
  • 11:26
    spring-projects-issues labeled #33484
Addanki Nageshwar
Spring Boot 1.5.21 not able to get the X-Forwarded-Host
and app is deployed in RHOS
Any help it will be very much thank ful
1 reply
Chathumina Vimukthi

Hi, I am trying to convert my normal spring boot service to webflux and stuck in the middle. What I don't understand is how to handle the business logic inside a Mono. So below is one of the function of my service class.

fun getProjectOverview(fiscalYear: Int): ProjectOverview? {
        val projectList: List<Project> = projectRepo.findAllProjects(fiscalYear)
        return if (projectList.isNotEmpty()) {
            val totalProjects = projectList.size
            val completedProjects = projectList.count { it.status == "COMPLETED" } //Add enums
            val meanScheduledVariance = (projectList.sumBy { it.schedule_variance } / totalProjects)
            val meanCostVariance = (projectList.sumBy { it.cost_variance } / totalProjects)

            ProjectOverview(totalProjects, completedProjects, meanScheduledVariance, meanCostVariance)
        } else {

I need to convert this into a reactive friendly way..Any help is much appreciated.

20 replies
Spring DomainEvents annotation and EventPublisher annotation provide two ways of publishing events. One needs repository interaction and the other doesn't. Are they managed by different thread pools ? AFAIK they are completely different from each other and sequencing of events when there are two publishing methods is difficult. We plan to use both. Aware of any guidelines ?
Sander Verhagen
Does anyone here know about the SpringOne Tour and if the talk of this Wednesday will be immediately available for playback?
Hi, is there are way to use autovalue instead of lombok with Spring WebFlux?
7 replies
Hi, I am new for here and I have a problem. I am using Spring boot to create a API Rest. However, when I use embeddable type, the table intermediate doesn't insert any data. I don't find the problem. I have posted my code in stack. If someone finds the problem, please help me. https://stackoverflow.com/q/64861471/13331446 . I'm sorry if asking this question does not comply with the group's rules but I'm desperate
James Howe
There's also a .cors() on the security configurer
James Howe
You didn't set any allowed domains in that last example
Also I don't understand the random /api/** at the end.
You mean it's actually /api/register/**?
James Howe
It doesn't mention the ApiController
Allows specifying which HttpServletRequest instances this HttpSecurity will be invoked on.
I'm not talking about that. I'm talking about OAuth2ResourceServer
I'm pretty sure it doesn't do what you want
Unless you do have endpoints matching /api/register/**, which is why I asked. But even then it won't work, but it makes more sense.
James Howe
Sorry, I didn't see what applyPermitDefaultValues() does. It adds Access-Control-Allow-Origin: *
All three methods do work. But it's not clear from your example what you actually want to do.
They all contradict each other.
James Howe
Please don't
Trey Turner
I'm trying to figure out why the spring milestone repo is intermittently requesting authentication to pull artifacts. An example: https://repo.spring.io/libs-milestone/com/aoe/geb-spock-reports/0.3.0-RC1/geb-spock-reports-0.3.0-RC1.jar
I used to be able to pull this artifact without issue, but the required auth is breaking my builds :( If there's a better place to ask this, I'd appreciate some direction on where that would be
9 replies
Joseph Thelen
Anybody happen to be really familiar with using TestNG with Spring Boot?
Caleb Cushing
I thought I'd seen an api for application args like this in spring boot https://www.npmjs.com/package/clipanion but all I've found is ApplicationArguments, is there one that I can't find? or another java one?
Caleb Cushing
something that just allows me to decorate the arguments with the needed details
including help
Not sure whether it is a spring-boot or spring-cloud related issue,
but if I have spring.config.import in both my default and test profile it still attempts to connect with my default (local) configserver instead of test when I startup with -Dspring.profiles.active=test :
    import: configserver:http://localhost:8888


      on-profile: test
    import: configserver:https://my-test-server
I would have expected that the spring.config.import from my test profile would override the value from the default profile? Am I mistaken here?
Cause when doing the same thing for other properties (e.g. spring.rabbitmq.host for example, there the overriding mechanism is working..)
1 reply
in spring i want to make api calls to third party and if api fails for certain times i need to retry this . any spring library provides generic interface for this where this could be implemented by RabbitMQ or some DB drive approach
5 replies
are unit tests affected by 2.4.0? i have some tests here that aren't supposed to run in the "test" profile but they're being executed anyway and consequently, they would fail because i have not yet properly migrated its profile settings to 2.4.0. Prior to the upgrade these tests ran fine.
24 replies
Florent Biville
Hi everyone, is there a specific reason that the latest SNAPSHOT of Spring Boot starters do not point to the latest SNAPSHOT of their corresponding project?
I can see this with spring-data-neo4j (the 2.4.1-SNAPSHOT starter points to Spring Data Neo4j 6.0.1)
Should I raise an issue for this?
1 reply
I'm wondering why my application works fine without @EnableJpaRepositories is it somehow default in spring boot apps ? Am I missing something?
1 reply
Michael Pratt

I'm trying to use the new publish flag in 2.4.0 to publish a Docker image to GitHub Container Registry. The image builds fine, but I get an error when it tries to publish:

[INFO] Successfully built image 'ghcr.io/michael-pratt/leaderboard-update:1.5.0'
[INFO]  > Pushing image 'ghcr.io/michael-pratt/leaderboard-update:1.5.0' 100%
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.4.0:build-image (default-cli) on project leaderboard-update: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.4.0:build-image failed: Error response received when pushing image: error parsing HTTP 405 response body: unexpected end of JSON input: "" -> [Help 1]

However, I can do docker push on the image manually and it works fine.

2 replies
first pic is spring boot 2.2.9. Second pic is spring boot 2.4.0.
Joseph Thelen
Is it possible to.. eh... delay? The expansion of placeholders in @PropertySource annotations (e.g. @PropertySource("classpath:${thing}.properties")) (used with @ConfigurationProperties) until some arbitrary time after the application has started up? In my case, the value of ${thing} isn't populated in the environment until after the application is already running :(
4 replies
this is just my guess but I think that's not what that part is intended for @joethe
1 reply
off the top of my head you'll probably need to do that programmatically.
Travis Tomsu

Hi all - trying to update spring-cloud-gcp to use Boot 2.4 and Cloud 2020.0.0-M5. I'm seeing an issue where a configuration is not being loaded because @ConditionalOnClassis now false - this got me going down a rabbit hole to see that spring-boot-autoconfigure-processor isn't actually outputting any META-INF/spring-autoconfigure-metadata.properties file. This may be a red herring, so does anyone know if something in this area has changed?

For reference, here are where are annotation processers are declared: https://github.com/GoogleCloudPlatform/spring-cloud-gcp/blob/master/spring-cloud-gcp-autoconfigure/pom.xml#L26-L36

The specific config that isn't loading is https://github.com/GoogleCloudPlatform/spring-cloud-gcp/blob/master/spring-cloud-gcp-autoconfigure/src/main/java/com/google/cloud/spring/autoconfigure/trace/StackdriverTraceAutoConfiguration.java#L80 with this output in the debug:

      Did not match:
         - @ConditionalOnClass did not find required class 'zipkin2.reporter.stackdriver.StackdriverSender' (OnClassCondition)

I see the JAR listed on the classpath and that class is contained in that JAR, so I'm not sure why it's not matching

1 reply
Travis Tomsu
@snicoll - I saw a few issues you've filed around the autoconfig-processor. Is that plugin required to get custom AutoConfig working, just to speed up startup times, or something else entirely?
Andy Wilkinson
The plugin produces metadata that optimises startup. Its use isn't required and should make no functional difference.
Travis Tomsu
That's good to know, too
Andy Wilkinson
Could the Stackdriver jar be corrupted?
Travis Tomsu
Doubt it - it's readable:
$ lesspipe /home/ttomsu/.m2/repository/io/zipkin/gcp/zipkin-sender-stackdriver/0.17.0/zipkin-sender-stackdriver-0.17.0.jar
Archive:  /home/ttomsu/.m2/repository/io/zipkin/gcp/zipkin-sender-stackdriver/0.17.0/zipkin-sender-stackdriver-0.17.0.jar
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
      81  Defl:N       80   1% 2020-05-19 00:55 ba1d086a  META-INF/MANIFEST.MF
       0  Stored        0   0% 2020-05-19 00:55 00000000  META-INF/
       0  Stored        0   0% 2020-05-19 00:52 00000000  zipkin2/
       0  Stored        0   0% 2020-05-19 00:52 00000000  zipkin2/reporter/
       0  Stored        0   0% 2020-05-19 00:52 00000000  zipkin2/reporter/stackdriver/
       0  Stored        0   0% 2020-05-19 00:52 00000000  zipkin2/reporter/stackdriver/internal/
       0  Stored        0   0% 2020-05-19 00:55 00000000  META-INF/maven/
       0  Stored        0   0% 2020-05-19 00:55 00000000  META-INF/maven/io.zipkin.gcp/
       0  Stored        0   0% 2020-05-19 00:55 00000000  META-INF/maven/io.zipkin.gcp/zipkin-sender-stackdriver/
    1727  Defl:N      712  59% 2020-05-19 00:55 3fc6a806  zipkin2/reporter/stackdriver/StackdriverSender$EmptyToVoid.class
    2092  Defl:N      990  53% 2020-05-19 00:55 48e39ac0  zipkin2/reporter/stackdriver/internal/CallbackToUnaryClientCallListener.class
    3528  Defl:N     1520  57% 2020-05-19 00:55 e3221fbd  zipkin2/reporter/stackdriver/internal/UnaryClientCall.class
    3579  Defl:N     1813  49% 2020-05-19 00:55 194dea32  zipkin2/reporter/stackdriver/internal/AwaitableUnaryClientCallListener.class
    2134  Defl:N      892  58% 2020-05-19 00:55 90e2b411  zipkin2/reporter/stackdriver/StackdriverSender$BatchWriteSpansCall.class
    8332  Defl:N     3637  56% 2020-05-19 00:55 834e3277  zipkin2/reporter/stackdriver/StackdriverSender.class
    3149  Defl:N     1455  54% 2020-05-19 00:55 90196472  zipkin2/reporter/stackdriver/StackdriverEncoder$1.class
     257  Defl:N      169  34% 2020-05-19 00:55 dd67ea3f  zipkin2/reporter/stackdriver/StackdriverSender$1.class
    1461  Defl:N      629  57% 2020-05-19 00:55 e5d88df6  zipkin2/reporter/stackdriver/StackdriverEncoder.class
    1003  Defl:N      460  54% 2020-05-19 00:55 fe07c405  zipkin2/reporter/stackdriver/StackdriverSender$EmptyToVoid$1.class
    1882  Defl:N      852  55% 2020-05-19 00:55 b4ae4c4d  zipkin2/reporter/stackdriver/StackdriverSender$Builder.class
    3614  Defl:N     1024  72% 2020-05-19 00:51 652fe8b3  META-INF/maven/io.zipkin.gcp/zipkin-sender-stackdriver/pom.xml
      74  Defl:N       70   5% 2020-05-19 00:52 cab5d8ba  META-INF/maven/io.zipkin.gcp/zipkin-sender-stackdriver/pom.properties
--------          -------  ---                            -------
   32913            14303  57%                            22 files