Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:06
    wilkinsona edited #33968
  • 11:06
    wilkinsona milestoned #33980
  • 11:06
    wilkinsona demilestoned #33980
  • 11:05
    wilkinsona milestoned #33983
  • 11:05
    wilkinsona demilestoned #33983
  • 11:05

    wilkinsona on 2.7.x

    Upgrade CI images to Docker 20.… (compare)

  • 11:05
    wilkinsona closed #33980
  • 11:05
    wilkinsona closed #33983
  • 11:05
    wilkinsona demilestoned #33981
  • 11:05
    wilkinsona milestoned #33981
  • 11:05
    wilkinsona closed #33981
  • 11:05

    wilkinsona on main

    Upgrade CI images to Docker 20.… Merge branch '2.7.x' into 3.0.x… Merge branch '3.0.x' Closes gh… (compare)

  • 11:05

    wilkinsona on 3.0.x

    Upgrade CI images to Docker 20.… Merge branch '2.7.x' into 3.0.x… (compare)

  • 11:01

    wilkinsona on 3.0.x

    Set implementation name and ver… (compare)

  • 11:01
    wilkinsona closed #34120
  • 11:01
    wilkinsona closed #34059
  • 11:01

    wilkinsona on main

    Set implementation name and ver… Merge branch '3.0.x' Closes gh… (compare)

  • 11:01
    wilkinsona milestoned #34059
  • 11:01
    wilkinsona demilestoned #34059
  • 11:00
    wilkinsona milestoned #34120
Andy Wilkinson
@wilkinsona
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
@SubhamAshish

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
@bilak
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
@dwmarley_twitter
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
@Bryksin

Hi
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?

acerdas84
@acerdas84
@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
@Bryksin

ok, seems I found. docs related to changes in Spring Boot 2.4.0
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-Config-Data-Migration-Guide

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
@philwebb
@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
@philwebb
@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
@jwcarman
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
@jwcarman
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
@jwcarman
I can pretty easily whip up an example if that'll help.
Cheikh Saadbouh
@cheikh-sadbouh

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
@pulse00
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
Bhumika
@bhumikat
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
@snicoll
@bhumikat looks like you’re having good support on your SO question already.
Bhumika
@bhumikat
thanks for reply
Stéphane Nicoll
@snicoll
I didn’t understand the reference to the 5 year thing.
Sander Verhagen
@sverhagen
Sounds like five years behind on upgrading. Goodness.
Stéphane Nicoll
@snicoll
Spring Data JDBC isn’t 5 years old
4 replies
(that’s why I am asking)
Bhumika
@bhumikat
ohk let me check
Stéphane Nicoll
@snicoll
check what? :expressionless:
ah I got my answer on my question on the SO thread.
Bhumika
@bhumikat
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
Stéphane Nicoll
@snicoll
These are two totally different projects. It’s not an “upgrade”.
Lukáš Vasek
@bilak
Hi, we are running some batching pods in kubernetes on spring-boot. We are having issues with performance so we need to slightly tune the tomcat instances. I've found this old blog from netflix, and it looks like it could help us little bit. Are we able to access current values of tomcat that following values maxThreads, acceptCount, maxConnections are limits for them?
r_mohan
@r_mohan_twitter
Can I ask if anyone uses DomainEvents and any other event publishing mechanism both at the same time ? DomainEvents need repository interaction. Other event publisher annotations don't. My questions is this. Do these two different mechanisms use 2 different thread pools ?
DDD events benefit from DomainEvents because there is repository interaction. Some events don't need repository interaction.
Vadim Bryksin
@Bryksin

@philwebb Hi, sorry didn't see you wrote to me here
Yes we can continue the conversation here. Am I right to say that this upgraded profiles system is no longer support active profile?
otherwise, you would give an answer in the ticket or here...

So the question is how those profiles are working now? and what should I change to make it work?

Vadim Bryksin
@Bryksin
For now I downgraded to Spring Boot: 2.3.6 and Cloud Version Hoxton.SR9
Vadim Bryksin
@Bryksin
is actuator no longer a part of spring boot?
had to mention import in gradle specifically, other way it was telling:
java.lang.NoClassDefFoundError: org/springframework/boot/actuate/info/InfoContributor
3 replies
nightswimmings
@nightswimmings
Hi! Is there a way to establish a default @SpringBootTest(args ="--myarg=x") parameter through application-test.yml? I tried with --myarg: x in application.yml but it does not get parsed as a SimpleCommandLineArgumentSource. I need to establish a default argument and I am required to be interpreted as an argument specifically, not a property
Thanks in advance!
My need is "X" is a placeholder that needs to be resolved through maven, and @SpringBoot(args="--myarg=${my.default.test.arg}") syntax is unsupported
12 replies
Fizii Q
@qfizii_gitlab
please document that to use spring-boot 2.4 startup endpoint, user needs to setup BufferingApplicationStartup
James Carman
@jwcarman
I’m still trying to figure out why the Hibernate hbm2ddl validate feature isn’t working in spring boot 2.3+. I’ve checked the migration guide and I didn’t see it mentioned. I’m digging through the code looking for any changes that could have caused it. So far, nothing
3 replies
Zac Harvey
@bitbythecron

hi there -- Spring Boot 2.x here -- does anybody know if its possible to start/stop micrometer-based metrics collection on demand?

i have a weird use case where I want to be able to stop all metrics collection (ALL) and restart it at a later time

Stéphane Nicoll
@snicoll
Interesting question @bitbythecron
Looking at the Micrometer code, I don’t see a way to stop scheduling. I’d ask on the micrometer slack to see if there’s any way to make it work.
Zac Harvey
@bitbythecron
ok will do @snicoll - :thumbsup: - thanks
Stéphane Nicoll
@snicoll
Coolio, keep us posted please!
Nipun Arora
@nipunarora

:wave: Hi folks, Is there a way in SpringBoot to capture the request payload for controller functions before they are mapped to objects?

For example if I have the following endpoint

@RequestMapping(value = "user", method = RequestMethod.POST)
ResponseEntity<Customer> testEndpoint(@RequestBody @Valid Customer payload) {
  System.out.println(payload);
  return ResponseEntity.ok(payload);
}

And what I’d like to do is write a function which logs the RequestBody as a string as it was received (not within the controller when it’s been transformed in an object). How can I do so? Is there a way to intercept the execution before the controller function body get’s transformed arguments?

4 replies
Lukáš Vasek
@bilak
hello, is it possible to somehow easily access org.apache.catalina.core.ApplicationContext or protocol org.apache.coyote.http11.Http11NioProtocol during application runtime?
Artem Salimov
@gocruncher
Hi guys. I would like to share with you a useful tool to run Jenkins Job from the Command Line (instead of the browser )
If it can be helpful for someone, please check it out and let me know what do you think
https://github.com/gocruncher/jenkins-job-cli
nightswimmings
@nightswimmings
I still have problems understanding spring.config.location vs spring.config.additional-location vs newest spring.config.import. What are the use cases for each now? Or is config.import as a much more fancy feature meant to be the replacement for the other 2?