Spring boot 2.7.3 and custom CharsetProvider - maven-shade-plugin

I'm trying to register a custom CharsetProvider.
As suggested in the https://stackoverflow.com/questions/39641604/spring-boot-1-4-x-and-custom-charsetprovider post we upgraded our application to use maven shade plugin for packaging which was automatically registering our custom charset provider and things were working fine till our application app was in Spring boot 2.7.3 and java 11. Once we tried upgrading our application to Java 17, again our custom charset provider was not loaded.
Any help would be highly appreciated.
Thanks in advance!
Upgraded java version to 17 and expected shade plugin to work the same way it was working with java 11.

Related

Need help in migrating spring code (running under OSGI using spring dm) to JDK 11

We have a lot of spring code written in our AEM application. We are using spring dm to run the code in osgi.
Now we would like to migrate our code to JDK 11 which requires us to migrate spring framework to 5.1 onwards. Is there a spring dm version with support springframework 5.1 onwards.
Are there any other alternative approaches to do such migration ??
regards,

Upgrade tomcat for spring boot application

The application is created using spring boot version 1.2.5 Release. I can see that it includes an embedded tomcat version which is 8.0.23. Is it possible to upgrade to a recent tomcat version, let's say, tomcat 9 with spring boot 1.2.5 and still run the application? Or do we need to upgrade the spring boot version to be compatible with tomcat 9? Is there any documentation for the spring boot version compatibility with Tomcat? Thank you.
Why do you want to upgrade it? What is the newer version of tomcat going to bring?
I personally go with the defaults for the spring version unless there is a specific need or issue.
That being said this question may have some pointers
How to change embedded tomcat's version in existing spring boot app?
You may be able to just set the property
9.0.5
It would be preferable to upgrade to the latest Spring Boot release (currently 2.2.5-RELEASE) to avail yourself of the latest features. There are many tutorials, migration guides, problem solutions, etc., out there to guide you, of which here are just a couple:
https://spring.io/blog/2018/03/12/upgrading-start-spring-io-to-spring-boot-2
Global CORS configuration breaks when migrating to Spring Boot 2.0.x
You didn't specify a reason for keeping your Spring Boot version at 1.2.5-RELEASE and only upgrading tomcat, but if you really must, there are other answers, such as here: How to change embedded tomcat's version in existing spring boot app?

Facing issue while upgrading from Spring Boot 1.x to Spring Boot 2.x

I have an already existing SpringBoot 1.x application which is using Java 7.I want to upgrade spring boot version from 1.x to 2.x.
For up gradation I have upgraded java version from 1.7 to 1.8 in maven pom.xml.
In existing application I am using apache log4j(org.apache.log4j.*) for logging purpose.Getting compilation error for log4j after up gradation.
Thanks in advance.
As of Spring Boot 1.4, the log4j (1.x) starter module is no longer available:
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-1.4-Release-Notes#deprecations-from-spring-boot-13
You can either switch to log4j2 (which still has a starter module) or you'll have to manually provide the log4j dependencies 1.x in your POM.

does spring security jars have dependency on java version?

I was using spring secuirty jars with version 4.1.0 and spring version 4.2.6 with java 7 and the code was working fine.
But when I shifted my code to java 1.6(due to some internal policies) and it stopped working. the frontEnd code is not even hitting the middle tier.
Also I am not getting any compile time or startup error in logs?
Any help around this, is highly appreciated.
Thanks

Spring 3.1.x and java 7u80

When compiled with java 7u79, spring 3.1 app is all good. When compiled on java 7u80, we're encountering some injection issues.
Searching a solution i found that Spring 3 is not compatible with java8, as explained here (due to asm).
We can see here that javac modifications were backported to java 7u80 and java 7u85.
So, am I rigth to think that it's same compatibility problem than for java 8, and that spring 3 app will not work if compiled on java7u80 ?
Sharing my experience - yes, some spring versions have problems with java 8. For example in my project we've had to change spring from 3.2.4 to 3.2.9 to use java 8. I won't put here any particular example because I don't have one but I would advice you to give spring 3.2.9 a chance. We're using it successfully with Java 8.

Resources