Much Slower Build Times with SpringBoot 1.4.3 - spring-boot

Anyone else seeing build performance issues with Spring Boot 1.4.3? Our previous builds with SpringBoot 1.4.2 were taking about 48 seconds with the following gradle command:
gradlew clean build
After only migrating to Spring Boot 1.4.3 (and therefore pulling in all the associated libraries), they're taking about 3 minutes and 47 seconds.

Related

Sonar coverage after upgrade of spring boot

I have upgraded one of my spring boot projects to 2.7.5 version and after analysis of projet on sonarqube server I got a 0% coverage, even I have already lot of unit tests.
Any idea of what is causing this ?
I have tried to reanalyse my project using mvn sonar:sonar but in vain

Long boot time for Jhipster & Stripe

I am facing a strange boot time issue. I have the latest version of Jhipster (6.8.0) alongside the latest Stripe Java (19.10.0).
The time the system takes to boot varies between 6-10 minutes on average after adding the Stripe library, where as if you put the Stripe library on a fresh spring boot installation it loads in less than 10 seconds.
I was wondering if anyone has had the same issue, on potentially which library is causing this disturbance at the boot time and how to solve it.
Many thanks

Spring boot deploy on Sap SCP

I need to understand how to deploy a spring boot webapp on SAP Cloud Platform.
I created a basic webapp using https://start.spring.io/.
I only added spring web as module.
I modified the generated pom excluding
spring-boot-starter-tomcat
jul-to-slf4j because I found a loop can be created by system
Then I added following dependencies as provided
slf4j-api
logback-classic
servlet-api
I added an empty web.xml, I deployed the compiled war on SCP and then I started.
After more or less 5 minutes of loading, the start fails and if I check the logs, I can't find any error.
Has anybody an idea of how I should proceed?
I even followed this tutorial, https://blogs.sap.com/2018/08/28/spring-boot-and-sap-cloud-platform-neo/, without any result.
Java version: 1.8
Tomcat version: 1.8
Spring boot version: 2.1.8.RELEASE
It looks that the problem was due to log level too low. It caused the generation of 15 mb log, apparently blocking the webapp start

Spring loaded 1.2.5 + Spring Boot 1.3.2. can't seem to get it to work

I came across a video on youtube ( https://www.youtube.com/watch?v=GTrNkhVnJBU ) where it demos Spring Loaded.
I'm trying to duplicate the same behavior but am still unsuccessful so far.
What I'm using:
Spring Tool Suite 3.7.2
Spring Boot 1.3.2-RELEASE
Spring loaded 1.2.5-RELEASE
Maven version 3.1.0
JDK 1.8.0_71
I tried the same thing as the guy does in the video (except for the versions being more up to date of course) but it doesn't work.
I also tried the "maven plugin" way as described in the spring docs here -> https://docs.spring.io/spring-boot/docs/current/reference/html/howto-hotswapping.html#howto-reload-springloaded-maven
But that also did not work.
I tried changing the versions of spring loaded to 1.2.0 (docs use that version) but that didn't do anything either.
I ran the app in STS itself, and also tried mvn spring-boot:run from command line, but both simply don't get the desired result.
When using mvn spring-boot:run I see that it is attaching the agent:
[INFO] Attaching agents: [C:\Users\ron.m2\repository\org\springframework\springloaded\1.2.5.RELEASE\springloaded-1.2.5.RELEASE.jar]
But changing RequestMappings or method signatures do not get picked up by spring loaded and thus the change is not reflected.
I'm a little out of ideas why I can't get this to work and any help would be greatly appreciated.
Spring loaded does not yet support spring 4.2. See https://github.com/spring-projects/spring-loaded/issues/139
So you either stick with DevTools which definitely speeds up the development process (although not as fast as spring-loaded), use JRebel (which supports the latest spring version) or downgrade to spring 4.1.
As an alternative you could also try the automatic restart feature of Spring Boot Devtools: https://spring.io/blog/2015/06/17/devtools-in-spring-boot-1-3. It restarts just the app and it is much quicker than restarting the whole JVM. You are loosing application state though, but it might be an alternative.

Using spring insight with an app that uses spring integration 1.0.4

I'm trying to deploy an existing app to tc-server. I have been using this app on tomcat for a couple of years and the production version already runs on tc-server. I have installed the version of tc-server that comes with spring insight. Everything goes well until I deploy a war file that has a dependency on spring integration. I'm getting a no class def found error and it is complaining about a class called
org/springframework/integration/transformer/AbstractMessageProcessingTransformer
I opened up the spring integration jar that is bundled with my war in the WEB-INF lib and did not see that class.
I poked around in the tomcat instance that I created with the bat files in tc-server and see a later version of spring-integration i.e.
.\insight\collection-plugins\insight-plugin-spring-integration-1.9.2.SR1.jar
Since my war is now getting a class not found exception (whereas it deploys fine on my normal tomcat 6.29 ) I'm assuming that this other version of spring-integration is being seen by my app somehow. My app is configured to use spring-integration-1.0.4.
Does anyone know how to get around this problem?
1.0.4 is an extremely old version (3+ years old) the current release is 2.2.4. That class was introduced in 2.0.0.
So you probably have a classpath issue - insight needs a more recent version of Spring Integration on the classpath.
The insight plugin version (1.9.2.x) is not related to the Spring Integration version (but it needs a much more recent version than 1.0.4).

Resources