Skip to content

How to add rewrite rule to spring boot 2.3.1

I have a Spring Boot application based on this example. Now the question is how can I add rewrite rules to my application that add /index.html when user visit the root URL. I mean when user visit http://localhost:8080/my-app or http://localhost:8080/my-app/ then I redirect him or her to http://localhost:8080/…

cant start server in eclipse after switch to openjdk

I recently downloaded and unziped openJdk 14 I then went to Eclipse > Java > Installed JREs and set the new jdk to be used However after doing this I am no longer able to run my server (tomcat webapp) I get an error from the jdk as well as a generic error in eclipse saying it failed to start

Spring 5.x and CDI 2.x Integration Options

Considering Spring’s 5.x baseline and CDI’s baseline 2.x, what more viable options should I consider to integrate them into a project with JSF 2.3, since JSF 2.3 is coupled with the CDI? Bridges? Custom Bean Factories? Others? Answer We use bean producers to access Spring objects in CDI. As in the…

Create BigDecimal from unscaled long

I’m trying to convert long 1099 to BigDecimal 10.99; This gives me 11.00: AFAIK this should work. What’s my bonehead error? Answer The error is that there’s a distinction between scale and precision. The constructor of MathContext accepts a precision, which is a total number of decimal digit…

Hide “var” type preview in new IntelliJ 2020.2

I just updated to IntelliJ 2020.2 and while some things are good some thing are bad.. When using the Java var feature IntelliJ now shows the type of it right next to the variable name which is completely useless to me and the only reason one uses var at all, because the type is already obvious. Displays in In…