Skip to content
Advertisement

Dynamic update query for multiple columns using spring MVC

I am having a JSON data as shown below:

I need a query to be executed and should be in the below form

I am using Spring MVC for processing this and the code I wrote is as follows. It is not complete.

It would be very much helpful if someone could help me out here. Thanks in advance.

Advertisement

Answer

I could find a satisfying answer at the end. Please follow the below instructions.

You need to import some packages and I am mentioning the Maven repository for the same below. Add the dependency in your pom.xml

Now Import the packages in your Impl file as follows:

The logic is explained in the below code

This was an RnD related task taken under a special usecase. The above logic perfectly and effectivelty delivers the output.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement