Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 03:22
    kse-music commented #33491
  • 02:34
    wangliang181230 commented #33491
  • 02:21
    wangliang181230 commented #33491
  • Dec 08 23:53
    mxsb commented #33493
  • Dec 08 23:49
    mxsb ready_for_review #33493
  • Dec 08 23:48
    mxsb synchronize #33493
  • Dec 08 23:02
    scottfrederick commented #33459
  • Dec 08 22:49
    welsh commented #33459
  • Dec 08 22:45
    scottfrederick commented #33493
  • Dec 08 21:42
    pascalgosselin commented #33496
  • Dec 08 21:33
    scottfrederick closed #33496
  • Dec 08 21:33
    scottfrederick commented #33496
  • Dec 08 21:32
    scottfrederick labeled #33496
  • Dec 08 21:32
    scottfrederick unlabeled #33496
  • Dec 08 21:31
    mxsb converted_to_draft #33493
  • Dec 08 21:22
    pascalgosselin closed #33496
  • Dec 08 21:22
    pascalgosselin commented #33496
  • Dec 08 21:16
    spring-projects-issues labeled #33497
  • Dec 08 21:13
    chrylis opened #33497
  • Dec 08 21:01
    spring-projects-issues labeled #33496
Caleb Cushing
@xenoterracide

anyone have any idea why I'm getting this?

23:10:34.448 [Test worker] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]
23:10:34.519 [Test worker] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating BootstrapContext using constructor [public org.springframework.test.context.support.DefaultBootstrapContext(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)]
    03:14:22.421 [Test worker] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context ...

when I havethis in application.properties

logging.level.com.xenoterracide.ppm=debug
logging.level.org.springframework=info
only seems to be happening in tests, I don't see debug starting the application
Caleb Cushing
@xenoterracide
2.4.0
Stéphane Nicoll
@snicoll
For anyone willing to reply to @xenoterracide they’ve created an issue on the issue tracker.
Caleb Cushing
@xenoterracide
James Howe
@OrangeDog
Why is the new startup actuator a POST endpoint?
13 replies
Konstantin Bläsi
@konstantinblaesi

in our logs we sometimes see (13 times in last 30 days) IOException: Broken pipe when spring tries to write to the client socket, followed by a

message: Servlet.service() for servlet [dispatcherServlet] in context with path [/api] threw exception
   stack_trace: j.lang.IllegalStateException: Cannot call sendError() after the response has been committed
    at o.a.c.connector.ResponseFacade.sendError(ResponseFacade.java:456)

does someone know what might be wrong in our code base? Sounds like we're trying to write to a response although spring already closed the connection right?

3 replies
HaloFour
@HaloFour
Is there a specific Gitter channel for Spring WebFlux?
5 replies
Addanki Nageshwar
@naddanki87
Hi
Team
Spring Boot 1.5.21 not able to get the X-Forwarded-Host
value
and app is deployed in RHOS
Any help it will be very much thank ful
1 reply
Chathumina Vimukthi
@ChathuminaVimukthi

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 {
            null
        }
    }

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

20 replies
r_mohan
@r_mohan_twitter
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
@sverhagen
Does anyone here know about the SpringOne Tour and if the talk of this Wednesday will be immediately available for playback?
favalos
@favalos
Hi, is there are way to use autovalue instead of lombok with Spring WebFlux?
7 replies
Alba
@AlbaSS18
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
@OrangeDog
There's also a .cors() on the security configurer
James Howe
@OrangeDog
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
@OrangeDog
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
@OrangeDog
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
@OrangeDog
Please don't
Trey Turner
@treyturner
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
@joethe
Anybody happen to be really familiar with using TestNG with Spring Boot?
Caleb Cushing
@xenoterracide
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
@xenoterracide
something that just allows me to decorate the arguments with the needed details
including help
dnijssen
@dnijssen
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 :
spring:
  config:
    import: configserver:http://localhost:8888

---

spring:
  config:
    activate:
      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
two10
@two10
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
CH4:D
@chad_d_stud_twitter
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
@fbiville_twitter
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
DevZyra
@DevZyra
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
@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]
[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
CH4:D
@chad_d_stud_twitter
image.png
image.png
CH4:D
@chad_d_stud_twitter
first pic is spring boot 2.2.9. Second pic is spring boot 2.4.0.