Home » Java

Java

Converting XML to JSON & Raw Use in MongoDB & Spring Batch

Overview Why convert XML to JSON for raw use in MongoDB? Since MongoDB uses JSON documents in order to store records, just as tables and rows store records in a relational database, we naturally need to convert our XML to JSON. Some applications may need to store raw (unmodified) JSON because there is uncertainty in how the data will be ...

Read More »

Java 9: Welcome to Module world

Java 9 has been released on September 21 officially, Eclipse is supporting Java 9 from  Eclipse Oxygen.1a (4.7.1a), Lets jump into module world..!!! Download Java 9 from here, and add it to Eclipse Installed JRE’s as below                   That’s it, we are good to write Java 9 module programs in Eclipse. Create ...

Read More »

Asynchronous communication made by OpenHub framework

java-interview-questions-answers

We introduced OpenHub framework in the previous part of this series. This part shows one of the most powerful feature of the framework – asynchronous messaging model. Asynchronous communication between systems is used when source system can’t wait for the response of the target system. There are several reasons: source system must be responsive as much as possible and not be ...

Read More »

Spring Cloud – Basic setup

spring-interview-questions-answers

Spring Cloud solves common problems of distributed systems. However, for someone who works only with widely known monolith applications jumping into the long list of patterns designed for distributed services might be quite overwhelming at the very beginning. This article will take you through the basics of Spring Cloud by taking a practical approach. After finishing, not only you should ...

Read More »

Java Command-Line Interfaces (Part 24): MarkUtils-CLI

The first post in this series on parsing command line arguments in Java featured the Apache Commons CLI library. This is one of the oldest and likely one of the most commonly used of the Java-based command-line parsing libraries covered in this series. Apache Commons CLI does show its age, especially when contrasted with some of the more modern Java-based ...

Read More »

Java Command-Line Interfaces (Part 23): Rop

The Rop library is described on its main page as “a lightweight command line option parser written in Java.” The “Introduction” to Rop also states, “Rop is designed to be minimal meanwhile convenient, and to cover most usual command line parsing use cases.” This post is the twenty-third in this series on parsing command line arguments in Java and focuses ...

Read More »

Jackson JSON Parsing Error – UnrecognizedPropertyException: Unrecognized field, not marked as ignorable [Solved]

While parsing JSON string received from one of our RESTful web services, I was getting this error “Exception in thread “main” com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field “person” (class Hello$Person), not marked as ignorable”. After some research, I found that this is one of the common error while parsing JSON document using Jackson open source library in Java application. The error messages say that ...

Read More »

Secure Spring Boot REST API using Basic Authentication

spring-interview-questions-answers

This is the third post of my Spring Boot Blog post series. In the very first post, I talked about my experience with creating RESTFul Services using Spring Boot. Then I have expanded the sample to integrate with Swagger documentation. In this post, I am going to expand above sample with security aspect. What is API Security API Security is a ...

Read More »