Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Oct 05 21:22
    bclozel closed #32585
  • Oct 05 21:21
    bclozel unlabeled #32585
  • Oct 05 21:21
    bclozel labeled #32585
  • Oct 05 20:52
    sdeleuze commented #31782
  • Oct 05 20:10
    mbhave unlabeled #30395
  • Oct 05 20:10
    mbhave labeled #30395
  • Oct 05 20:10
    mbhave demilestoned #30395
  • Oct 05 20:10
    mbhave closed #30395
  • Oct 05 20:10
    mbhave commented #30395
  • Oct 05 19:55
    spring-projects-issues labeled #32585
  • Oct 05 19:54
    pivotal-cla commented #32585
  • Oct 05 19:54
    abenti opened #32585
  • Oct 05 19:22
    Shivangip285 edited #32584
  • Oct 05 19:17
    bclozel labeled #32494
  • Oct 05 19:17
    bclozel labeled #32494
  • Oct 05 19:17
    bclozel unlabeled #32494
  • Oct 05 19:17
    bclozel commented #32494
  • Oct 05 19:17
    bclozel reopened #32494
  • Oct 05 19:14
    wilkinsona unlabeled #32584
  • Oct 05 19:14
    wilkinsona labeled #32584
Hello, I'm interested in contributing to the spring framework as a volunteer... I have the code checked out and looking for pointers on how do I get started on the source code. Is there any getting started document or someone I may reach out to?
Is there a way to have a @Component add an environment property that is picked up by the components created after it?
Travis Tomsu

@wilkinsona - Here's a simple sample demonstrating the missing ConditionalOnClass - https://github.com/ttomsu/trace-service-one

Run the server with ./mvnw spring-boot:run -Dspring-boot.run.jvmArguments="-Ddebug" | less +F and you can see in the debug output that StackdriverTraceAutoConfiguration does not match because of a missing zipkin2.reporter.stackdriver.StackdriverSender

However, you can see with ./mvnw dependency:tree -Dincludes=io.zipkin.gcp that it's there:

[INFO] --- maven-dependency-plugin:3.1.2:tree (default-cli) @ demo ---
[INFO] com.example:demo:jar:0.0.1-SNAPSHOT
[INFO] \- com.google.cloud:spring-cloud-gcp-starter-trace:jar:2.0.0-RC1:compile
[INFO]    +- io.zipkin.gcp:zipkin-sender-stackdriver:jar:0.17.0:compile
[INFO]    |  \- io.zipkin.gcp:zipkin-translation-stackdriver:jar:0.17.0:compile
[INFO]    \- io.zipkin.gcp:brave-propagation-stackdriver:jar:0.17.0:compile
5 replies
oof, just got bit by a change to WebClient where ClientResponse.mutate will release the original body if you replace it the body. In my case I was taking the existing body, transforming it and then setting it to the body of the mutated response. I see the new helper method for transforming the body and have migrated to it, but that was tricky to triage.
Daniel Zou
In Spring Boot 2.4.0 - there is introduced the new Config Data loading concept (via. ConfigDataLoader & ConfigDataLocationResolver). There is this object called ConfigDataLocationResolverContext that gets passed around these objects. Is there a way for library integrators to prepopulate the bootstrap context that gets returned by ConfigurableBootstrapContext getBootstrapContext() in the interface? We used to be able to do this with registering a org.springframework.cloud.bootstrap.BootstrapConfiguration in spring.factories but does this not work anymore?
3 replies
Fizii Q
spring question: if I am already using jcl-over-slf4j, should that be removed in favor of spring-jcl?
@wilkinsona I got the unit tests working (ish) I'm not sure if this is a bug or intended but I moved application-test.properties to src/main/resources. Previously it was supposed to be in src/test/resources.
Then I added this in application.properties:
# Test

Am I doing this wrong? I have the following configuration:

# Dev
spring.config.activate.on-profile=test | local | dev 

# Test

But I get this error:

Property: my.key
Value: null
Reason: must not be null

However, if I put my.key inside application-test.properties my.key is set.

Okay, the parser is a little touchy. Apparently I can't have adjacent comments around #---

The version has been upgraded from SpringBoot 2.3.4 to 2.4.
I get a build error
What should i do?
Lend me your wisdom

Project build error: Non-parseable POM C: \ project \ jcom-cca \ sts-bundle \ workspace \ release \ maven \ org \ springframework \ boot \ spring-boot-dependencies \ 2.4.0 \ spring-boot-dependencies -2.4.0.pom: end tag not allowed in epilog but got / (position: END_TAG seen ... </ build> \ n </ project> \ n </ ... @ 2869: 9)

2 replies

Hello I need help
I create a Spring boot with sub modules with Gradle (kt) and Kotlin
When I run java -jar I have this error

aucun attribut manifest principal dans app.jar
In english :
no manifest attribut in app.jar
Do you know what does it mean

4 replies
hello all, is it possible to call another repository in the repository ? example : repoA and inside repoA i call repoB using Autowired
3 replies
James Howe
It would be better to create a service which injects both of them
Mirko Manojlovic
Hi guys, I've been looking everywhere but I can't find the answer so if anybody knows something it would be largely appreciated. I am using spring-data-redis and I have a simple sorted set that I want to use. So for example if I have a set that contains score 10 value 1, if insert another entry score 11 value 1, I don't want it to be overridden or in other words I want to use NX option from here https://redis.io/commands/zadd. How can I do that using StringRedisTemplate? In docs it says that default is to update the value https://docs.spring.io/spring-data/redis/docs/current/api/org/springframework/data/redis/connection/RedisZSetCommands.html#zAdd-byte:A-double-byte:A-
Similar question was asked here: https://stackoverflow.com/questions/63609715/spring-data-redis-zadd-command-missed-nxxxincr-options
3 replies
Hi mates! After reading latest changes on Boot 2.4, this article left me wondering: https://spring.io/blog/2020/08/14/config-file-processing-in-spring-boot-2-4. Since Spring already provides the amazing spring-cloud-config (bootstrap.yml), how do all of this changes fit in here? I mean aren't ConfigMaps already supported in a nice way?
4 replies
If they are 2 unrelated ways, which one is preferred? Looks to me like the fanciness of cloud solutions is unmatchable
Rod McCutcheon

Hi all, I've got an interesting issue running a Junit 5 test suite with Spring Boot 2.3.6. If I run the offending test case separately it works fine, but if run the full test suite it gets stuck on:

2020-11-20 13:47:50.975 INFO 96182 --- [nTaskExecutor-1] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2020-11-20 13:47:51.065 INFO 96182 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 2020-11-20 13:47:51.072 INFO 96182 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'taskScheduler'

public class TaskSchedulerConfig {

    private int taskSchedulerPoolSize;

    public TaskScheduler taskScheduler() {
        ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
        return scheduler;


Is there some manual shutdown I need to do between tests?

6 replies
Subham Ashish
hey all
what could be the plugin for jaxb in gradle similar to what maven gives
can anybody help on this?
Andy Wilkinson
There's no need to mention me or anyone else directly. The community will try and help as and when they can. Have you tried search Gradle's Plugin Portal for xjc? It returns several options which sound like they may do what you want: https://plugins.gradle.org/search?term=xjc
Subham Ashish

hey thanks for responding, I tried all this and end up an exception

org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method jaxb()

that's the reason thought to ask in this community

Lukáš Vasek
Hello, in tomcat are parameters like maxThreads, acceptCount, maxConnections. I'd like to return 503 with retry-after header when for example maxThreads and acceptCount are at maximum. Is there any option how to retrieve this statistics? Or better is there some support for returning error when maximum values of this parameters are reached?
Derek Marley
Hello - can someone point me in the right direction to better understand how to set the memory settings in spring boot 2.3 when it generates the docker container -- or would I override the values when deploying to K8s, as right now it logs that it is selecting 1GIG for memory (any help would be welcomed)
1 reply
Vadim Bryksin

just started new spring boot service with cloud config
and noticed that spring.profiles now deprecated, and it suggests to use: spring.config.activate.on-profile: dev

However setting: spring.profiles.active: dev has no effect, now boot spring says:

INFO 9830 --- [main] s.StudentOptionsSolverServiceApplication : No active profile set, falling back to default profiles: default

Where can I see any info regarding profiles changes in latest spring boot?
And how to set profile now?

@bilak I think this post might help you https://netflixtechblog.com/tuning-tomcat-for-a-high-throughput-fail-fast-system-e4d7b2fc163f . Also maxThreads will be reached way before than acceptCount, to check on metrics for use you can use spring boot actuators (not sure if they will work for what you are looking for) maybe that is a path
1 reply
Vadim Bryksin

ok, seems I found. docs related to changes in Spring Boot 2.4.0

it says:

You can still use the 'spring.profiles.active' property to activate specific profiles, however, you won’t be able to use this property in combination with 'spring.config.activate.on-profile'

but what should I use to activate profile then with spring.config.activate.on-profile ???

Phil Webb
@Bryksin I think I need to update the docs because you're not the first person to comment that things are confusing. What we're trying to do is remove the complexity when profile specific properties try activate further profiles. If you're able to share a small sample that shows what you're trying I can take a look. Be aware that there isn't yet a GA release of Spring Cloud that works with Boot 2.4.
Phil Webb
@Bryksin I see you've commented in issue https://github.com/spring-projects/spring-boot/issues/24167#issuecomment-731335173. We can continue the discussion there.
James Carman
Has something changed recently (in 2.3.x and 2.4.x maybe) with respect to Hibernate's HBM2DDL and setting that to validate?
If I change my project to use 2.2.11.RELEASE, I get a schema validation error for missing tables (nothing is creating them in the h2 in-memory database), but if I upgrade to 2.3.6.RELEASE or 2.4.0 the schema validation error goes away (no other changes to my code or application.properties)
James Carman
It doesn't appear to be the hibernate version causing it, because I forced a downgrade to Hibernate 5.4.22.Final (what Spring Boot 2.2.11.RELEASE uses) by setting a property in my pom.xml file.
If I remove comment out spring.jpa.hibernate.ddl-auto=validate from my application.properties file, I can see that it does indeed do the hbm2ddl stuff and creates the tables just fine.
If I set spring.jpa.hibernate.ddl-auto=update, it also creates the table(s). It's just if I use the value validate that it appears to just get turned off completely. It appears to be treating it as if I set that property to none.
James Carman
I can pretty easily whip up an example if that'll help.
Cheikh Saadbouh

Hello everyone,

Are there any classes or interfaces other than {Model , ModelMap , ModelAndView } that deal with Model or/and view in the context of spring MVC ?

1) Model : Model defines a holder for model attributes,
2) ModelMap : ModelMap is an extension of Model with the ability to store attributes
3) ModelAndView : ModelAndView is a holder for a model and a view

Thanks in advance

Robert Gründler
Hi there - i'm playing around with the spring boot maven plugins feature to build docker images using buildpack. however, when in run this in a ci like gitlab, i need to have a docker image containing docker and java/maven for this to work. Does anyone know any existing images which are recommended by spring-boot - or should i just build my own?
2 replies
hello all, when I upgrade spring-data-jdbc-repository with latest spring boot version 2.3.5.RELEASE, it will give compile time error for more info https://stackoverflow.com/questions/64963585/how-to-create-persistententityinformation-object
can anybody help on it. thanks
Stéphane Nicoll
@bhumikat looks like you’re having good support on your SO question already.
thanks for reply
Stéphane Nicoll
I didn’t understand the reference to the 5 year thing.
Sander Verhagen
Sounds like five years behind on upgrading. Goodness.
Stéphane Nicoll
Spring Data JDBC isn’t 5 years old
4 replies
(that’s why I am asking)
ohk let me check
Stéphane Nicoll
check what? :expressionless:
ah I got my answer on my question on the SO thread.
I am using https://github.com/jirutka/spring-data-jdbc-repository and now if I switched on https://github.com/spring-projects/spring-data-jdbc then what are changes required to do. that I need to check