Home » Tag Archives: Spring

Tag Archives: Spring

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 »

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 »

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 »

Getting started with Spring Data Cassandra

I have recently been learning Apache Cassandra to use at work and I think it is about time I consolidated my experience within a blog post. But rather than focusing on how Cassandra works itself this post will look at how to use Spring Data Cassandra. I know I just said I wouldn’t focus on how Cassandra works, but if ...

Read More »

Spring Batch CSV Processing

spring-interview-questions-answers

Overview Topics we will be discussing include the essential concepts of batch processing with Spring Batch and how to import the data from a CSV into a database. 0 – Spring Batch CSV Processing Example Application We are building an application that demonstrates the basics of Spring Batch for processing CSV files. Our demo application will allow us to process ...

Read More »

Differences between @RequestParam and @PathVariable annotations in Spring MVC?

spring-interview-questions-answers

The Spring MVC framework, one of the most popular frameworks for developing a web application in Java world also provides several useful annotations to extract data from the incoming request and mapping the request to controller e.g. @RequestMapping, @RequestParam, and @PathVariable. Even though both @RequestParam and @ParthVariable is used to extract values from the HTTP request, there is a subtle ...

Read More »

Asynchronous and Transactional Event Listeners in Spring

spring-interview-questions-answers

The built-in event publication functionality exists from the early Spring versions and it is still useful for handling basic communication between Spring components in the same application context. In general, the application can generate application events (that can be arbitrary objects) and listen to them. The whole mechanism is really simple: using ApplicationPublisher you publish events and using EventListener you ...

Read More »

Call on me, or Asynchronous REST

spring-interview-questions-answers

This article is a very simple example of a working asynchronous REST application, made with Spring Boot + Java 8. Spring Boot makes developing web applications almost ridiculously easy, but to simplify the task even more, I took an example from Spring repository called rest-service , forked it to my own repository and changed it for my purposes to create two applications: ...

Read More »

Spring Boot – spring.config.name – Case Study

spring-interview-questions-answers

Externalizing Spring Boot application properties is useful when the same application code must be used with different configuration. If the configuration is to be kept away from the source code (which is considered a best practice anyways)spring.config.location environment property can be used to point the directory location with properties files for example. On the other hand, spring.config.name can be used ...

Read More »